Issue with Python statsmodels requirement in Docker image build - python

I'm trying to build a Docker image for an AWS Batch job, but a new requirement (the Python package statsmodels) is breaking my build process.
requirements.txt lines:
pandas
numpy
statsmodels
Complete Dockerfile:
FROM python:3
COPY requirements.txt /home/
COPY .env /home/
COPY src home/src
COPY process.py /home/
WORKDIR /home/
ENV TZ=America/New_York
RUN /usr/local/bin/python -m pip install --upgrade pip
RUN pip install -r ./requirements.txt
ENV PYTHONPATH='.'
Error log excerpts:
#12 271.7 INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
#12 288.4 INFO: pip is looking at multiple versions of us to determine which version is compatible with other requirements. This could take a while.
#12 288.4 Collecting us
#12 288.4 Downloading us-2.0.1.tar.gz (13 kB)
#12 288.8 Downloading us-2.0.0.tar.gz (13 kB)
#12 289.3 Downloading us-1.0.0.tar.gz (13 kB)
#12 289.8 Downloading us-0.9.1.tar.gz (13 kB)
#12 290.2 Downloading us-0.9.0.tar.gz (13 kB)
#12 290.6 Downloading us-0.8.0.tar.gz (12 kB)
#12 291.2 Downloading us-0.7.1.tar.gz (12 kB)
#12 291.5 INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
#12 291.5 INFO: pip is looking at multiple versions of us to determine which version is compatible with other requirements. This could take a while.
#12 291.6 Downloading us-0.7.tar.gz (11 kB)
#12 291.9 Downloading us-0.6.tar.gz (9.9 kB)
#12 292.3 Downloading us-0.5.tar.gz (9.3 kB)
#12 292.7 Downloading us-0.4.tar.gz (9.3 kB)
#12 293.0 Downloading us-0.3.tar.gz (7.5 kB)
#12 293.4 INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
#12 293.4 INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
#12 293.4 Downloading us-0.2.tar.gz (6.9 kB)
#12 294.0 Downloading us-0.1.tar.gz (6.3 kB)
#12 294.4 INFO: pip is looking at multiple versions of statsmodels to determine which version is compatible with other requirements. This could take a while.
#12 294.9 Collecting statsmodels
#12 294.9 Downloading statsmodels-0.12.0.tar.gz (17.5 MB)
#12 297.5 Installing build dependencies: started
#12 309.5 Installing build dependencies: finished with status 'done'
#12 309.5 Getting requirements to build wheel: started
#12 392.2 Getting requirements to build wheel: still running...
#12 400.0 Getting requirements to build wheel: finished with status 'done'
#12 400.1 Preparing wheel metadata: started
#12 401.3 Preparing wheel metadata: finished with status 'done'
#12 401.9 Downloading statsmodels-0.11.1.tar.gz (15.4 MB)
#12 404.2 Installing build dependencies: started
#12 415.7 Installing build dependencies: finished with status 'done'
#12 415.7 Getting requirements to build wheel: started
#12 480.8 Getting requirements to build wheel: still running...
#12 481.5 Getting requirements to build wheel: finished with status 'done'
#12 481.5 Preparing wheel metadata: started
#12 482.6 Preparing wheel metadata: finished with status 'done'
#12 483.1 Downloading statsmodels-0.11.0.tar.gz (15.4 MB)
#12 485.5 Installing build dependencies: started
#12 488.6 Installing build dependencies: finished with status 'error'
#12 488.6 ERROR: Command errored out with exit status 1:
#12 488.6 command: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_0xxe4fy/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.29.14' 'numpy==1.14.5; python_version=='"'"'3.5'"'"'' 'numpy==1.14.5; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"'' 'numpy==1.17.5; python_version>='"'"'3.8'"'"'' 'scipy>=1.0'
#12 488.6 cwd: None
#12 488.6 Complete output (13 lines):
#12 488.6 Ignoring numpy: markers 'python_version == "3.5"' don't match your environment
#12 488.6 Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
#12 488.6 ERROR: Cannot install numpy==1.14.5 and numpy==1.17.5 because these package versions have conflicting dependencies.
#12 488.6
#12 488.6 The conflict is caused by:
#12 488.6 The user requested numpy==1.14.5
#12 488.6 The user requested numpy==1.17.5
#12 488.6
#12 488.6 To fix this you could try to:
#12 488.6 1. loosen the range of package versions you've specified
#12 488.6 2. remove package versions to allow pip attempt to solve the dependency conflict
#12 488.6
#12 488.6 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
#12 488.6 ----------------------------------------
#12 488.6 ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_0xxe4fy/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.29.14' 'numpy==1.14.5; python_version=='"'"'3.5'"'"'' 'numpy==1.14.5; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"'' 'numpy==1.17.5; python_version>='"'"'3.8'"'"'' 'scipy>=1.0' Check the logs for full command output.
------
failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c pip install -r ./requirements.txt]: runc did not terminate sucessfully
Updated Dockerfile per comments:
FROM debian:10-slim
# install Python, pip, and misc build needs
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
python3-dev \
python3-pip \
python3-setuptools \
&& apt-get clean
# bring in program logic
COPY .env /root/.env # this may need to go into /root/.env (or a custom user)
COPY src /app/
COPY processer.py submit-processer.py /app/
COPY requirements.txt /app/
# install Python dependencies
RUN pip3 install --no-cache-dir -r /app/requirements.txt
# set env vars
ENV TZ=America/New_York
# running process logic
WORKDIR /app
ENTRYPOINT ["python3", "processer.py"]
Error log of updated process:
[+] Building 0.7s (7/12)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 979B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/debian:10-slim 0.6s
=> [internal] load build context 0.0s
=> => transferring context: 15.91kB 0.0s
=> CANCELED [1/8] FROM docker.io/library/debian:10-slim#sha256:062bbd9a1 0.0s
=> => resolve docker.io/library/debian:10-slim#sha256:062bbd9a1a58c9c5b8 0.0s
=> CACHED [2/8] RUN apt-get update && apt-get install --no-install-r 0.0s
=> ERROR [3/8] COPY .env /root/.env # this may need to go into /root/.e 0.0s
------
> [3/8] COPY .env /root/.env # this may need to go into /root/.env (or a custom user):
------
failed to solve with frontend dockerfile.v0: failed to build LLB: failed to compute cache key: "/#" not found: not found

It's not entirely clear why from your Dockerfile (I'm surprised the tag 3 isn't sufficient to just pick the latest stable of 3.9.1-buster), but pip is trying to resolve dependencies for several versions of Python (implying there are several installed in the base container)
#12 488.6 ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_0xxe4fy/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.29.14' 'numpy==1.14.5; python_version=='"'"'3.5'"'"'' 'numpy==1.14.5; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"'' 'numpy==1.17.5; python_version>='"'"'3.8'"'"'' 'scipy>=1.0' Check the logs for full command output.
Specifying a minor version may clear this up.
If you don't have a particular version need, 3.8-slim-buster (Debian 10 with Python 3.8 .. actually 3.8.9 for now though this may change with bug fixes to that version) may be a practical choice and fix this for you!
from python:3.8-slim-buster
...
If this does not fix the error, then it's likely your 3 tag is just fine and instead extremely-likely that your .env is problematic (presumably it's a Python virtual environment you are trying to preserve).
Regenerate the venv within the context of your container with a new RUN block rather than COPY-ing what your host system has.
After the comments, I think it's worth trying a different Dockerfile which is much more what I would use with at least the following changes
base directly off Debian 10 (you may find another container is more efficient/smaller/whatever, but it's extremely likely this works out of the box)
install Python 3 yourself
don't use /home/ as a base
FROM debian:10-slim
# install Python, pip, and misc build needs
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
python3-dev \
python3-pip \
python3-setuptools \
&& apt-get clean
# bring in program logic
COPY .env /app/ # this may need to go into /root/.env (or a custom user)
COPY src /app/
COPY process.py /app/
COPY requirements.txt /app/
# install Python dependencies
RUN pip3 install --no-cache-dir -r /app/requirements.txt
# set env vars
ENV TZ=America/New_York
# running process logic
WORKDIR /app
ENTRYPOINT ["python3", "process.py"]
If this works
using /home may be problematic (rather than /home/someuser/...)
there could be something weird with the upstream python base container (I have never personally used it, though that would also be surprising)
If this does not work
you may not be working in the directory you think you are (ie. copying the current directory in, another similar-looking directory, etc.)
your src may have something bizarre in it
statsmodels may be broken (it's versioned 0.12, so that's not totally unreasonable)

Related

Can't install docker-compose into jenkins dockerfile

I try to install docker-compose into docker-container but it fails to build.
Here's my dockerfile:
FROM jenkinsci/blueocean
USER root
RUN apk add --no-cache py-pip python3-dev libffi-dev openssl-dev gcc libc-dev rust cargo make gettext
RUN pip3 install docker-compose
USER jenkins
And it shows me an error:
Building wheels for collected packages: bcrypt, cryptography, pynacl, pyrsistent, PyYAML
Building wheel for bcrypt (PEP 517): started
Building wheel for bcrypt (PEP 517): finished with status 'done'
Created wheel for bcrypt: filename=bcrypt-3.2.0-cp39-cp39-linux_x86_64.whl size=64287 sha256=4d90a6bcaa110ba58a48889ded4adb0f92fa7966ea45a8abeea0ad6f8a94004f
Stored in directory: /root/.cache/pip/wheels/9a/0b/a2/2c559982bbee4bd184557267e5760e114de3e9ba826fe8d691
Building wheel for cryptography (PEP 517): started
Building wheel for cryptography (PEP 517): still running...
Building wheel for cryptography (PEP 517): finished with status 'done'
Created wheel for cryptography: filename=cryptography-3.4.8-cp39-cp39-linux_x86_64.whl size=1360638 sha256=ef093594bbb07d34bc6de28f7447a6c257813cda8e83f5254c42d01b602351da
Stored in directory: /root/.cache/pip/wheels/28/ea/c2/e48100a4f4674263f982c899942ed5225966b37b47e9b631f6
Building wheel for pynacl (PEP 517): started
Building wheel for pynacl (PEP 517): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpi_pcnqvb
cwd: /tmp/pip-install-w50jx1wy/pynacl_e9c31de258254c47941580c85da83563
Complete output (322 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/nacl
....
subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.
ERROR: Failed building wheel for pynacl
Building wheel for pyrsistent (PEP 517): started
Building wheel for pyrsistent (PEP 517): finished with status 'done'
Created wheel for pyrsistent: filename=pyrsistent-0.18.0-cp39-cp39-linux_x86_64.whl size=115732 sha256=24c93c9e75844cd86f8fee6965a97c1e7068c5042b7745085d612c047cf23103
Stored in directory: /root/.cache/pip/wheels/dd/c8/61/04c6d218b3691f75353d7f74fed3fbd40e0ee9e2d1e2ce24c6
Building wheel for PyYAML (PEP 517): started
Building wheel for PyYAML (PEP 517): finished with status 'done'
Created wheel for PyYAML: filename=PyYAML-5.4.1-cp39-cp39-linux_x86_64.whl size=45654 sha256=231652b88a0bcee5f8b831941b4bf38a80d8815a54474f798a482a128047402b
Stored in directory: /root/.cache/pip/wheels/b7/a5/c4/504d913c2a55bb09c607541578ec5f844d1ff33467abe93ba5
Successfully built bcrypt cryptography pyrsistent PyYAML
Failed to build pynacl
ERROR: Could not build wheels for pynacl which use PEP 517 and cannot be installed directly
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c apk add --no-cache py-pip python3-dev libffi-dev openssl-dev gcc libc-dev rust cargo make gettext && pip3 install docker-compose' returned a non-zero code: 1
I was trying to upgrade/downgrade the pip but it stays the same. Please, help.
I changed my dockerfile and it's working now. https://wiki.alpinelinux.org/wiki/Docker
FROM jenkinsci/blueocean
USER root
RUN apk add --no-cache docker-compose
USER jenkins

Preparing wheel metadata ... error ERROR: Command errored out with exit status 1 while installing apex

what i am doing
pip install apex
what error it is showing-
Collecting apex
Using cached apex-0.9.10dev.tar.gz (36 kB)
Collecting cryptacular
Using cached cryptacular-1.5.5.tar.gz (39 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lenovo\anaconda3\new_folder\python.exe' 'c:\users\lenovo\anaconda3\new_folder\lib\site-packages\pip\_
vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Lenovo\AppData\Local\Temp\tmpgjm4o5t7'
cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-ngmptthv\cryptacular
Complete output (52 lines):
i am struggling the same error with dataclasses==0.8 please somebody help me out.
The correct way to install apex :
git clone https://github.com/NVIDIA/apex
cd apex
pip3 setup.py install
# or
pip3 install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

Failed to install PyGObject with Python3.6 in Raspberry Pi 3

I've manually installed Python3.6 in Raspberry Pi3. I'm trying to install PyGObject which fails with the error:
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f4i084p_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools wheel pycairo
cwd: None
Complete output (36 lines):
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
Collecting setuptools
Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting pycairo
Downloading pycairo-1.20.0.tar.gz (344 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Building wheels for collected packages: pycairo
Building wheel for pycairo (PEP 517): started
Building wheel for pycairo (PEP 517): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpazwu2ueb
cwd: /tmp/pip-install-k30bx276/pycairo
Complete output (12 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.6
creating build/lib.linux-armv7l-3.6/cairo
copying cairo/__init__.py -> build/lib.linux-armv7l-3.6/cairo
copying cairo/__init__.pyi -> build/lib.linux-armv7l-3.6/cairo
copying cairo/py.typed -> build/lib.linux-armv7l-3.6/cairo
running build_ext
Requested 'cairo >= 1.15.10' but version of cairo is 1.14.8
Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for pycairo
Failed to build pycairo
ERROR: Could not build wheels for pycairo which use PEP 517 and cannot be installed directly
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f4i084p_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools wheel pycairo Check the logs for full command output.
As per my understanding, the failure occurs while building PyCairo-1.20.0 which needs cairo >= 1.15.10' but version of cairo is 1.14.8.
Possible solution:
pycairo-1.20.0 is a recent release (5 Oct 2020).
If the build uses pycairo-1.19.1, I believe the installation will succeed as it needs cairo >= 1.13.1.
So, my question is:
Disregarding my "possible solution", is there any way to install PyGObject using pip3 for python3.6 in Raspberry Pi 3?
With respect to my "possible solution", how to install PyGObject that uses PyCairo-1.19.1 ?
The command I executed is:
sudo PYGOBJECT_WITHOUT_PYCAIRO=1 pip3 install --no-build-isolation --no-use-pep517 pygobject
which installs PyGObject without installing PyCairo.
https://github.com/pygobject/pycairo/issues/219

Building python pypi wheels, the usual nightmare [duplicate]

This question already has answers here:
Pip install from pypi works, but from testpypi fails (cannot find requirements)
(2 answers)
Closed 2 years ago.
I'm trying to build a package and upload it to pypi, I get past that point and the upload is successful, let me walk you through what I'm doing:
setup.py:
from setuptools import setup, find_packages
setup(
name='project_name',
version='1.0',
packages=find_packages(),
url='url',
license='license',
author='author',
author_email='email_here#some_mail.com',
description='description',
install_requires=[
'oauth2client',
'pyarrow',
'pandas',
'requests',
'gcloud'
],
)
I do:
% python3 setup.py sdist bdist_wheel
followed by
% python3 -m twine upload -u username -p password --repository-url https://test.pypi.org/legacy/ dist/*
both run perfectly fine, no errors / warnings ...
Then I get a url which contains:
% pip install -i https://test.pypi.org/simple/ project_name==1.0
So I create a virtualenv environment and try to install:
% virtualenv test_env
% source test_env/bin/activate
% pip install -i https://test.pypi.org/simple/ project_name==1.0
For some reason I get this at first:
ERROR: Could not find a version that satisfies the requirement gcloud (from project_name==1.0) (from versions: none)
ERROR: No matching distribution found for gcloud (from project_name==1.0)
Then I get something else after retrying (no changes applied) to run the last command and I get other results as well. So ... what's wrong?
simple/ project_name==1.0
Looking in indexes: https://test.pypi.org/simple/
Collecting project_name==1.0
Downloading https://test-files.pythonhosted.org/packages/08/38/b040820ceddc63a87596a5a29ce3a5d1b309555238d7ae063835e8c8ea8a/project_name-1.0-py3-none-any.whl (9.1 kB)
Collecting pyarrow
Downloading https://test-files.pythonhosted.org/packages/c1/82/04249512513b31d7cd9f6fa63cf0d1c64c4705da32e3c3ece9d676e235ff/pyarrow-1.0.1.tar.gz (1.3 MB)
|████████████████████████████████| 1.3 MB 594 kB/s
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /Users/username/Desktop/testenv/bin/python /Users/username/Desktop/testenv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/rp/xxjnjsvn70g2ndh68l0g10bh0000gn/T/pip-build-env-cnc0ds0l/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://test.pypi.org/simple/ -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel
cwd: None
Complete output (4 lines):
Looking in indexes: https://test.pypi.org/simple/
Ignoring numpy: markers 'python_version < "3.7"' don't match your environment
ERROR: Could not find a version that satisfies the requirement cython>=0.29 (from versions: 0.23.4)
ERROR: No matching distribution found for cython>=0.29
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/username/Desktop/testenv/bin/python /Users/username/Desktop/testenv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/rp/xxjnjsvn70g2ndh68l0g10bh0000gn/T/pip-build-env-cnc0ds0l/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://test.pypi.org/simple/ -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel Check the logs for full command output.
Note: The package is fine, I'm able to install it on my system interpreter (python3.8) of my mbp but that is because all the dependencies numpy, gcloud ... are already installed.
I think this is because pip is looking for the package dependancies in https://test.pypi.org/simple/ where they don't exist.
Try:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple your-package
This will pull your package from test.pypi but then fall back on regular pypi when pip fails to find the dependancies there.

Error executing: pip install opencv-python

So im trying to install OpenCV-Python using my administrator command prompt in windows 10 and my version of python is 3.9 and pip is fully updated.. here is the (massive) error I get after trying to execute pip install opencv-python
This is what happens:
C:\WINDOWS\system32>pip install opencv-python
Collecting opencv-python
Using cached opencv-python-4.4.0.44.tar.gz (88.9 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\inbet\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.240.0_x64__qbz5n2kfra8p0\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\inbet\AppData\Local\Temp\pip-build-env-prbqcb63\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.11.3; python_version=='"'"'3.5'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"''
cwd: None
Complete output (310 lines):
Ignoring numpy: markers 'python_version == "3.5"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7"' don't match your environment
Collecting setuptools
Using cached setuptools-50.3.1-py3-none-any.whl (785 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting scikit-build
Using cached scikit_build-0.11.1-py2.py3-none-any.whl (72 kB)
Collecting cmake
Using cached cmake-3.18.2.post1-py3-none-win_amd64.whl (34.7 MB)
Collecting pip
Using cached pip-20.2.3-py2.py3-none-any.whl (1.5 MB)
Collecting numpy==1.17.3
Using cached numpy-1.17.3.zip (6.4 MB)
Collecting distro
Using cached distro-1.5.0-py2.py3-none-any.whl (18 kB)
Collecting packaging
Using cached packaging-20.4-py2.py3-none-any.whl (37 kB)
Collecting six
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pyparsing>=2.0.2
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Using legacy 'setup.py install' for numpy, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, distro, six, pyparsing, packaging, scikit-build, cmake, pip, numpy
Running setup.py install for numpy: started
Running setup.py install for numpy: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\inbet\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\inbet\\AppData\\Local\\Temp\\pip-install-dqkz6qyf\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\inbet\\AppData\\Local\\Temp\\pip-install-dqkz6qyf\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\inbet\AppData\Local\Temp\pip-record-zko205u_\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\inbet\AppData\Local\Temp\pip-build-env-prbqcb63\overlay' --compile --install-headers 'C:\Users\inbet\AppData\Local\Temp\pip-build-env-prbqcb63\overlay\Include\numpy'
cwd: C:\Users\inbet\AppData\Local\Temp\pip-install-dqkz6qyf\numpy\
Complete output (277 lines):
Running from numpy source directory.
There is a LOT more after that but I am unable to post the error in its entirety as it says "it looks like your post is mostly code. please add some more details"
My gut feeling is that all of this is occurring because my python directory isn't in C:\ProgramFiles\Python or maybe it has to do with the fact that I installed python via the windows app store.
I know its a lot of code and I am literally just beginning to get into this because I am trying to create a script that will scrape eBay thumbnails and download the images from a start page with search terms entered, if and only if those images contain numbers. Hence why I am trying to install OpenCV.
Any help would be greatly appreciated. The last time I ever coded anything was when I was 12 years old playing Never Winter Nights which used something like C+ so I generally know my way around under the hood but am totally new to python specific commands and am hoping this little project I am attempting will teach me a useful amount about python and also automate this whole "needle in a haystack" search for images with numbers in them.
Cheers
opencv require install wheel before that

Categories