Error in installing pip package auto-py-to-exe - python

I am trying to install auto-py-to-exe. In fact, I installed it but a months ago, I reinstalled my windows 10. After that, I am continuously trying to install auto-py-to-exe. Whenever I type pip install auto-py-to-exe in command prompt this output comes out
Collecting auto-py-to-exe
Using cached auto_py_to_exe-2.7.11-py2.py3-none-any.whl (75 kB)
Collecting Eel==0.12.4
Using cached Eel-0.12.4.tar.gz (15 kB)
Collecting pyinstaller>=4.1
Using cached pyinstaller-4.1.tar.gz (3.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting bottle
Using cached bottle-0.12.19-py3-none-any.whl (89 kB)
Collecting bottle-websocket
Using cached bottle-websocket-0.2.9.tar.gz (2.0 kB)
Collecting future
Using cached future-0.18.2.tar.gz (829 kB)
Collecting whichcraft
Using cached whichcraft-0.6.1-py2.py3-none-any.whl (5.2 kB)
Collecting pyinstaller-hooks-contrib>=2020.6
Using cached pyinstaller_hooks_contrib-2020.11-py2.py3-none-any.whl (172 kB)
Collecting altgraph
Using cached altgraph-0.17-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: setuptools in c:\users\mniza\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller>=4.1->auto-py-to-exe) (49.2.1)
Collecting pywin32-ctypes>=0.2.0; sys_platform == "win32"
Using cached pywin32_ctypes-0.2.0-py2.py3-none-any.whl (28 kB)
Collecting pefile>=2017.8.1; sys_platform == "win32"
Using cached pefile-2019.4.18.tar.gz (62 kB)
Collecting gevent-websocket
Using cached gevent_websocket-0.10.1-py3-none-any.whl (22 kB)
Collecting gevent
Using cached gevent-20.12.1.tar.gz (5.9 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' 'c:\users\mniza\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a5' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17, < 2.0 ; platform_python_implementation == '"'"'CPython'"'"''
cwd: None
Complete output (29 lines):
Collecting setuptools>=40.8.0
Using cached setuptools-51.1.1-py3-none-any.whl (2.0 MB)
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting Cython>=3.0a5
Using cached Cython-3.0a6-py2.py3-none-any.whl (1.0 MB)
Collecting cffi>=1.12.3
Using cached cffi-1.14.4-cp39-cp39-win_amd64.whl (179 kB)
Collecting greenlet<2.0,>=0.4.17
Using cached greenlet-0.4.17.tar.gz (61 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Using legacy 'setup.py install' for greenlet, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, Cython, pycparser, cffi, greenlet
Running setup.py install for greenlet: started
Running setup.py install for greenlet: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\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\mniza\AppData\Local\Temp\pip-record-sq3sf8sv\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --compile --install-headers 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay\Include\greenlet'
cwd: C:\Users\mniza\AppData\Local\Temp\pip-install-c3p25el7\greenlet\
Complete output (5 lines):
running install
running build
running build_ext
building 'greenlet' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\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\mniza\AppData\Local\Temp\pip-record-sq3sf8sv\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --compile --install-headers 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay\Include\greenlet' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the 'c:\users\mniza\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' 'c:\users\mniza\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a5' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17, < 2.0 ; platform_python_implementation == '"'"'CPython'"'"'' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the 'c:\users\mniza\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
I assume that there is something wrong with Microsoft Visual C++ as I can see in the error
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
But when I try to install Microsoft Visual C++ I see this window error in installing Microsoft Visual C++ 14.0 (picture)
I again checked the program list and I am a little bit confused which one should I uninstall and which one should I keep program list (picture). Overall I am stuck in this issue for more than three weeks and I will be grateful if anyone can solve this issue.

At last, I have figured out what is the problem. First I have to install a suitable wheel file of greenlet from https://www.lfd.uci.edu/~gohlke/pythonlibs/#greenlet. And then open the command prompt in the directory of the wheel file. Then type
pip install (filename)
After that, again download the wheel file of gevent from https://www.lfd.uci.edu/~gohlke/pythonlibs/#gevent. As before open command prompt in the directory of the wheel file and type pip install (filename) again.
After all of this, type pip install auto-py-to-exe
Hope this will to you as it worked to me!

Related

pip install requirements failing with exit code 1 [duplicate]

This question already has answers here:
Error trying to install Postgres for python (psycopg2)
(12 answers)
pg_config executable not found
(54 answers)
Closed 1 year ago.
When I'm trying to install the requirements for a project with pip install -r requirements.txt
It keeps failing with the following output.
[sarthak#envy cyc1eon]$ pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting asgiref==3.2.10
Downloading asgiref-3.2.10-py3-none-any.whl (19 kB)
Collecting dj-database-url==0.5.0
Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
Collecting Django==3.0.8
Downloading Django-3.0.8-py3-none-any.whl (7.5 MB)
|████████████████████████████████| 7.5 MB 2.6 MB/s
Collecting django-heroku==0.3.1
Downloading django_heroku-0.3.1-py2.py3-none-any.whl (6.2 kB)
Collecting gunicorn==20.0.4
Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
|████████████████████████████████| 77 kB 5.5 MB/s
Requirement already satisfied: setuptools>=3.0 in /usr/lib/python3.9/site-packages (from gunicorn==20.0.4->-r requirements.txt (line 5)) (54.2.0)
Collecting psycopg2==2.8.5
Downloading psycopg2-2.8.5.tar.gz (380 kB)
|████████████████████████████████| 380 kB 9.7 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lc8h8hyn/psycopg2_4a4c96a147204fd489df1a2f7201063a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lc8h8hyn/psycopg2_4a4c96a147204fd489df1a2f7201063a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ztzh9r6w
cwd: /tmp/pip-install-lc8h8hyn/psycopg2_4a4c96a147204fd489df1a2f7201063a/
Complete output (23 lines):
running egg_info
creating /tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info
writing /tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-ztzh9r6w/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The requirements for the project are
asgiref==3.2.10
dj-database-url==0.5.0
Django==3.0.8
django-heroku==0.3.1
gunicorn==20.0.4
psycopg2==2.8.5
psycopg2-binary==2.8.5
python-decouple==3.3
pytz==2020.1
sqlparse==0.3.1
whitenoise==5.1.0
The error message is clear - missing pg-config and thus unable to build from source. Alternative to building from source is to use psycorg2-binary - already present in the requirements.txt and suggested in the error message itself:
If you prefer to avoid building psycopg2 from source, please install
the PyPI 'psycopg2-binary' package instead
Just remove psycopg2==2.8.5 from requirements.txt.
Alternatively check pg_config executable not found
try replacing:
asgiref==3.2.10
dj-database-url==0.5.0
Django==3.0.8
django-heroku==0.3.1
gunicorn==20.0.4
psycopg2==2.8.5
psycopg2-binary==2.8.5
python-decouple==3.3
pytz==2020.1
sqlparse==0.3.1
whitenoise==5.1.0
in requirements.txt by:
asgiref
dj-database-url
Django
django-heroku
gunicorn
psycopg2
psycopg2-binary
python-decouple
pytz
sqlparse
whitenoise

Can't install resampy

Ubuntu 20.04.2
I am using python2.7 in a virtualenv (because the program I'm trying to build doesn't work with my 3.8)
pip 20.3.4
The program I'm trying to run (involves tensorflow) comes with a file with all the things needed to install (I think that's a dockerfile?). When I try to run the program I get an error about one of the items in the dockerfile -- resampy.
I get an ImportError:No module resampy
I did a pip install resampy
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Processing /home/pete/.cache/pip/wheels/19/90/bb/f45e7cc1cfc8f5299c12511fccefcca90c801de995a4e7eb00/resampy-0.2.2-py2-none-any.whl
Collecting numba>=0.32
Using cached numba-0.47.0-cp27-cp27mu-manylinux1_x86_64.whl (3.6 MB)
Requirement already satisfied: numpy>=1.10 in /home/pete/env/py2.7/lib/python2.7/site-packages (from resampy) (1.13.1)
Requirement already satisfied: scipy>=0.13 in /home/pete/env/py2.7/lib/python2.7/site-packages (from resampy) (0.19.1)
Requirement already satisfied: six>=1.3 in /home/pete/env/py2.7/lib/python2.7/site-packages (from resampy) (1.11.0)
Requirement already satisfied: singledispatch; python_version < "3.4" in /home/pete/env/py2.7/lib/python2.7/site-packages (from numba>=0.32->resampy) (3.4.0.3)
Collecting llvmlite>=0.31.0dev0
Using cached llvmlite-0.32.1.tar.gz (104 kB)
Requirement already satisfied: setuptools in /home/pete/env/py2.7/lib/python2.7/site-packages (from numba>=0.32->resampy) (44.1.1)
Requirement already satisfied: funcsigs; python_version < "3.3" in /home/pete/env/py2.7/lib/python2.7/site-packages (from numba>=0.32->resampy) (1.0.2)
Requirement already satisfied: enum34; python_version < "3.4" in /home/pete/env/py2.7/lib/python2.7/site-packages (from numba>=0.32->resampy) (1.1.10)
Building wheels for collected packages: llvmlite
Building wheel for llvmlite (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/pete/env/py2.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UP2Yh4/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-UP2Yh4/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ZIPpvD
cwd: /tmp/pip-install-UP2Yh4/llvmlite/
Complete output (7 lines):
running bdist_wheel
/home/pete/env/py2.7/bin/python /tmp/pip-install-UP2Yh4/llvmlite/ffi/build.py
File "/tmp/pip-install-UP2Yh4/llvmlite/ffi/build.py", line 122
raise ValueError(msg.format(_ver_check_skip)) from e
^
SyntaxError: invalid syntax
error: command '/home/pete/env/py2.7/bin/python' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite, numba, resampy
Running setup.py install for llvmlite ... error
ERROR: Command errored out with exit status 1:
command: /home/pete/env/py2.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UP2Yh4/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-UP2Yh4/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-j9jtLs/install-record.txt --single-version-externally-managed --compile --install-headers /home/pete/env/py2.7/include/site/python2.7/llvmlite
cwd: /tmp/pip-install-UP2Yh4/llvmlite/
Complete output (10 lines):
running install
running build
got version from file /tmp/pip-install-UP2Yh4/llvmlite/llvmlite/_version.py {'version': '0.32.1', 'full': 'aa11b129c0b55973067422397821ae6d44fa5e70'}
running build_ext
/home/pete/env/py2.7/bin/python /tmp/pip-install-UP2Yh4/llvmlite/ffi/build.py
File "/tmp/pip-install-UP2Yh4/llvmlite/ffi/build.py", line 122
raise ValueError(msg.format(_ver_check_skip)) from e
^
SyntaxError: invalid syntax
error: command '/home/pete/env/py2.7/bin/python' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/pete/env/py2.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UP2Yh4/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-UP2Yh4/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-j9jtLs/install-record.txt --single-version-externally-managed --compile --install-headers /home/pete/env/py2.7/include/site/python2.7/llvmlite Check the logs for full command output.
I tried a pip3 install resampy and the result looks better:
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: resampy in /usr/local/lib/python3.8/dist-packages (0.2.2)
Requirement already satisfied: numba>=0.32 in /usr/local/lib/python3.8/dist-packages (from resampy) (0.52.0)
Requirement already satisfied: scipy>=0.13 in /usr/local/lib/python3.8/dist-packages (from resampy) (1.6.0)
Requirement already satisfied: numpy>=1.10 in /home/pete/.local/lib/python3.8/site-packages (from resampy) (1.19.4)
Requirement already satisfied: six>=1.3 in /usr/lib/python3/dist-packages (from resampy) (1.14.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from numba>=0.32->resampy) (45.2.0)
Requirement already satisfied: llvmlite<0.36,>=0.35.0 in /usr/local/lib/python3.8/dist-packages (from numba>=0.32->resampy) (0.35.0)
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
No error. But when I try and run the program I'm trying to run I still get the original ImportError
I admit that I'm in over my head here. I basically only have a moderate level of python knowledge/experience. I don't even know what a "wheel" is and I can't find anything in it because "wheel" is kind of hard to google without finding stuff about tires and such. So even just pointers to learn about what a "wheel" is would be helpful.
Thanks!
Maybe try out this one
pip install llvmlite==0.31.0
pip install resampy
In my case, the current llvmlite package version crashed it. But this package is needed for resampy.
You could also try an earlier version of resampy, which is independent of llvmlite.
pip install resampy==0.1.5
Good Luck
I tried py27 installation failed too before.
But you can install it using py38 via
pip install resampy
You can test it by
pip install -e .[tests]
pip install pytest pytest-cov pytest-faulthandler
py.test --cov-report term-missing --cov resampy
The result:
As for the ImportError, once you successfully installed it, it works well for me:

I am trying to download Django-heroku. But I am getting this Error: pg_config executable not found., how to solve it?

Error:
(myvenv) (base) siddhants-MacBook-Air:personal-project siddhantbhargava$ pip install django-heroku
Collecting django-heroku
Using cached django_heroku-0.3.1-py2.py3-none-any.whl (6.2 kB)
Requirement already satisfied: dj-database-url>=0.5.0 in ./myvenv/lib/python3.8/site-packages (from django-heroku) (0.5.0)
Requirement already satisfied: whitenoise in ./myvenv/lib/python3.8/site-packages (from django-heroku) (5.2.0)
Requirement already satisfied: django in ./myvenv/lib/python3.8/site-packages (from django-heroku) (2.2.17)
Requirement already satisfied: pytz in ./myvenv/lib/python3.8/site-packages (from django->django-heroku) (2020.5)
Requirement already satisfied: sqlparse>=0.2.2 in ./myvenv/lib/python3.8/site-packages (from django->django-heroku) (0.4.1)
Collecting psycopg2
Using cached psycopg2-2.8.6.tar.gz (383 kB)
ERROR: Command errored out with exit status 1:
command: /Users/siddhantbhargava/personal-project/myvenv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-install-8opynhmw/psycopg2_6f717d71852848bb86def529de299ce9/setup.py'"'"'; __file__='"'"'/private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-install-8opynhmw/psycopg2_6f717d71852848bb86def529de299ce9/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd
cwd: /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-install-8opynhmw/psycopg2_6f717d71852848bb86def529de299ce9/
Complete output (23 lines):
running egg_info
creating /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info
writing /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
pip install django-heroku # deprecated
renamed package from django-heroku to django-on-heroku
pip install django-on-heroku # try this one
django-on-heroku PyPI

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

Python package installation via pip error

I’m trying to install few python packages via pip3, but at most of them I’m geting Errors that I don’t understand. For example:
root#turris:~# pip3 install pyshark
Collecting pyshark
Downloading pyshark-0.4.2.9-py3-none-any.whl (31 kB)
Collecting py
Downloading py-1.8.1-py2.py3-none-any.whl (83 kB)
|████████████████████████████████| 83 kB 1.6 MB/s
Collecting lxml
Downloading lxml-4.5.0.tar.gz (4.5 MB)
|████████████████████████████████| 4.5 MB 3.6 MB/s
Installing collected packages: py, lxml, pyshark
Running setup.py install for lxml ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eln_tufx/lxml/setup.py'"'"' ; __file__='"'"'/tmp/pip-install-eln_tufx/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.c lose();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-0uhmqqdg/install-record.txt --single-version-externally-managed --compile --insta ll-headers /usr/include/python3.6/lxml Check the logs for full command output.
I have python3.6 installed and pip 20.0.2. I already updated setuptools and wheel. Now i get this:
root#turris:~/skripty# python3.6 -m pip install numpy
Collecting numpy
Using cached numpy-1.18.2.zip (5.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3.6 /usr/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpf_8xl1dr Check the logs for full command output.
I'm using TurrisOS (modificated OpenWRT distro). Does anyone know what is wrong? Thanks.
EDIT:
Ok, I fixed the error for Pyshark package by this:
opkg update
opkg install python3-lxml
pip3 install pyshark
But I’m still getting another errors when installing e.g. numpy.
root#turris:~# pip3 install numpy
Collecting numpy
Using cached numpy-1.18.2.zip (5.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp6bzl_666 Check the logs for full command output.
Or another package and different error:
root#turris:~# pip3 install matplotlib
Collecting matplotlib
Downloading matplotlib-3.2.1.tar.gz (40.3 MB)
|████████████████████████████████| 40.3 MB 11.3 MB/s
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Categories