I clone my Script from Github. Then I install the requirements.txt with Gitbash.
1.) source ../venv/Scripts/activate
2.) pip install -r requirements.txt
If I try now to run the script some packages are missing everytime.
Then I need to manually install them and it is just unconvenient.
python script.py # ModuleNotFoundError: No modul named 'dateutil'
And I really dont know what I am making wrong. My Goal is after Cloning and installing to the venv it should work but it doesnt work.
$ python --version
Python 3.8.0
$ pip --version
pip 19.3.1 from c:\users\user\desktop\dokumente\venv\lib\site-packages\pip (python 3.8)
$ pip show --files python-dateutil
WARNING: Package(s) not found: python-dateutil
$ pip install -r requirements.txt
Collecting aniso8601==7.0.0
Using cached https://files.pythonhosted.org/packages/45/a4/b4fcadbdab46c2ec2d2f6f8b4ab3f64fd0040789ac7f065eba82119cd602/aniso8601-7.0.0-py2.py3-none-any.whl
Collecting asn1crypto==0.24.0
Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting astroid==2.2.5
Using cached https://files.pythonhosted.org/packages/d5/ad/7221a62a2dbce5c3b8c57fd18e1052c7331adc19b3f27f1561aa6e620db2/astroid-2.2.5-py3-none-any.whl
Collecting attrs==19.1.0
Using cached https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
Collecting Automat==0.7.0
Using cached https://files.pythonhosted.org/packages/a3/86/14c16bb98a5a3542ed8fed5d74fb064a902de3bdd98d6584b34553353c45/Automat-0.7.0-py2.py3-none-any.whl
Processing c:\users\user\appdata\local\pip\cache\wheels\b1\fe\08\84d2143069bc44c20127c38cc1bf202332319b3da7315ca766\camelcase-0.2-cp38-none-any.whl
Collecting certifi==2019.9.11
Using cached https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl
Collecting cffi==1.12.3
Using cached https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\desktop\dokumente\agent_venv\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-onw899ll\\cffi\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-onw899ll\\cffi\\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 'C:\Users\User\AppData\Local\Temp\pip-install-onw899ll\cffi\pip-egg-info'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-onw899ll\cffi\
Complete output (23 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-onw899ll\cffi\setup.py", line 127, in <module>
if sys.platform == 'win32' and uses_msvc():
File "C:\Users\User\AppData\Local\Temp\pip-install-onw899ll\cffi\setup.py", line 105, in uses_msvc
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
File "c:\users\user\appdata\local\programs\python\python38-32\Lib\distutils\command\config.py", line 225, in try_compile
self._compile(body, headers, include_dirs, lang)
File "c:\users\user\appdata\local\programs\python\python38-32\Lib\distutils\command\config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "c:\users\user\appdata\local\programs\python\python38-32\Lib\distutils\_msvccompiler.py", line 360, in compile
self.initialize()
File "c:\users\user\appdata\local\programs\python\python38-32\Lib\distutils\_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\user\desktop\dokumente\agent_venv\venv\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\user\desktop\dokumente\agent_venv\venv\lib\site-packages\setuptools\msvc.py", line 1075, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "c:\users\user\desktop\dokumente\agent_venv\venv\lib\site-packages\setuptools\msvc.py", line 547, in __init__
vc_ver or self._find_latest_available_vs_ver())
File "c:\users\user\desktop\dokumente\agent_venv\venv\lib\site-packages\setuptools\msvc.py", line 561, in _find_latest_available_vs_ver
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: 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: python setup.py egg_info Check the logs for full command output.
I hope you can help me. If you need some extra information to solve the problem then please tell it to me.
Best Regards
Cren
Related
On running pip install easyocr in windows terminal in administrator mode. Gives the following output:
Collecting easyocr Using cached easyocr-1.0.tar.gz (8.5 MB) WARNING:
The candidate selected for download or install is a yanked version:
'torch' candidate (version 0.1.2.post2 at
https://files.pythonhosted.org/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz#sha256=a43e37f8f927c5b18f80cd163daaf6a1920edafcab5102e02e3e14bb97d9c874
(from https://pypi.org/simple/torch/)) Reason for being yanked: 0.1.2
is past it's support date and confuses users on unsupported platforms
Collecting torch Using cached torch-0.1.2.post2.tar.gz (128 kB) ERROR:
Command errored out with exit status 1: command:
'c:\python27\python.exe' -c 'import sys, setuptools, tokenize;
sys.argv[0] =
'"'"'c:\users\khushk~1\appdata\local\temp\pip-install-7vcyae\torch\setup.py'"'"';
file='"'"'c:\users\khushk~1\appdata\local\temp\pip-install-7vcyae\torch\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
'c:\users\khushk~1\appdata\local\temp\pip-pip-egg-info-trszn4' cwd:
c:\users\khushk~1\appdata\local\temp\pip-install-7vcyae\torch
Complete output (8 lines): Traceback (most recent call last): File
"", line 1, in File
"c:\users\khushk~1\appdata\local\temp\pip-install-7vcyae\torch\setup.py",
line 147, in import numpy as np File "C:\Users\Khush
Kalavadia\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\numpy_init_.py",
line 132 raise ImportError(msg) from e ^ SyntaxError: invalid syntax
---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full
command output.
On running pip install easyocr in Visual Studio Code. Gives the following output:
Collecting easyocr Using cached easyocr-1.0.tar.gz (8.5 MB) WARNING:
The candidate selected for download or install is a yanked version:
'torch' candidate (version 0.1.2.post2 at
https://files.pythonhosted.org/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz#sha256=a43e37f8f927c5b18f80cd163daaf6a1920edafcab5102e02e3e14bb97d9c874
(from https://pypi.org/simple/torch/)) Reason for being yanked: 0.1.2
is past it's support date and confuses users on unsupported platforms
Collecting torch Using cached torch-0.1.2.post2.tar.gz (128 kB)
Collecting torchvision Using cached
torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB) Collecting
opencv-python Using cached opencv-python-4.3.0.38.tar.gz (88.0 MB)
Installing build dependencies ... done Getting requirements to build
wheel ... error ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe'
'c:\python27\lib\site-packages\pip_vendor\pep517_in_process.py'
get_requires_for_build_wheel
'c:\users\khushk~1\appdata\local\temp\tmpgrhqfp'
cwd: c:\users\khushk~1\appdata\local\temp\pip-install-6wppb1\opencv-python
Complete output (22 lines): Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip_vendor\pep517_in_process.py",
line 280, in
main()
File "c:\python27\lib\site-packages\pip_vendor\pep517_in_process.py",
line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\python27\lib\site-packages\pip_vendor\pep517_in_process.py",
line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "c:\users\khushk~1\appdata\local\temp\pip-build-env-iff1we\overlay\Lib\site-packages\setuptools\build_meta.py", line 146, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "c:\users\khushk~1\appdata\local\temp\pip-build-env-iff1we\overlay\Lib\site-packages\setuptools\build_meta.py", line 127, in _get_build_requires
self.run_setup()
File "c:\users\khushk~1\appdata\local\temp\pip-build-env-iff1we\overlay\Lib\site-packages\setuptools\build_meta.py", line 243, in run_setup
self).run_setup(setup_script=setup_script)
File "c:\users\khushk~1\appdata\local\temp\pip-build-env-iff1we\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 448, in
main()
File "setup.py", line 99, in main
% {"ext": re.escape(sysconfig.get_config_var("EXT_SUFFIX"))}
File "c:\python27\lib\re.py", line 210, in escape
s = list(pattern) TypeError: 'NoneType' object is not iterable ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\python27\python.exe'
'c:\python27\lib\site-packages\pip_vendor\pep517_in_process.py'
get_requires_for_build_wheel
'c:\users\khushk~1\appdata\local\temp\tmpgrhqfp' Check the logs for
full command output.
Trying to pip3 install fastparquet package in a Docker image (where I first sudo apt install python3 and set pip.conf to use a company internal package repository) gives me
Step 6/6 : RUN pip3 install fastparquet
---> Running in 2dd7fb7de45e
Looking in indexes: https://anon.artifactory.internal.net/api/pypi/ext-pypi/simple, https://anon.artifactory.internal.net/api/pypi/gr-pypi/simple
Collecting fastparquet
Downloading https://anon.artifactory.internal.net/api/pypi/ext-pypi/packages/packages/c2/3e/970dcb3605c1d406be9304f00895bf89ca6b71162afa7f95c5a4032bf927/fastparquet-0.5.0.tar.gz (120 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ijksg7gm/fastparquet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ijksg7gm/fastparquet/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-p1c1xxm6
cwd: /tmp/pip-install-ijksg7gm/fastparquet/
Complete output (25 lines):
Download error on https://pypi.python.org/simple/numpy/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'numpy' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for numpy>=1.11
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ijksg7gm/fastparquet/setup.py", line 98, in <module>
**extra
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 513, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 774, in resolve
replace_conflicting=replace_conflicting
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1057, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1069, in obtain
return installer(requirement)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 580, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 692, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('numpy>=1.11')
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2.4; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
Removing intermediate container 2dd7fb7de45e
The command '/bin/sh -c pip3 install fastparquet' returned a non-zero code: 1
If I instead pip3 install numpy==1.11, there is no problem.
If I first upgrade pip3, then pip3 install fastparquet works but pip3 install fastparquet==0.3.2 gives the same error.
I fixed this by first installing setuptools==42.0.0, which switched to using pip to resolve setup_requires (https://setuptools.readthedocs.io/en/latest/history.html#v42-0-0). (fastparquet uses setup_requires to install numpy before its installed itself)
OS: Windows 10
Python ver: 3.9.0
Error code:
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I tried:
python -m pip install -U pip
python -m pip install -U matplotlib
didn't work.
and then I tried:
pip install --upgrade setuptools
didn't solve the problem.
I read on SO that maybe if I open the shell in administrator mode it could solve the problem but it didn't work too.
I saw someone mentioning ez-setup for this error code. I installed it but that didn't work too.
I don't know if it has something to do but my C directory looks like this:
C:\Users\METİNUSTA
It has an uppercase i character which sometimes can cause problems with applications. I can't change it because I am using my school's Windows key and it don't let me do any change. Because of this I installed python on D: .
Also here my pip list for extra information:
ez-setup 0.9
flake8 3.8.4
mccabe 0.6.1
pip 20.2.4
pycodestyle 2.6.0
pyflakes 2.2.0
setuptools 50.3.2
wheel 0.35.1
and finally whole error log that I get on windows powershell:
ERROR: Command errored out with exit status 1:
command: 'd:\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\METİNUSTA\\AppData\\Local\\Temp\\pip-install-8iv10tb_\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\METİNUSTA\\AppData\\Local\\Temp\\pip-install-8iv10tb_\\matplotlib\\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 'C:\Users\METİNUSTA\AppData\Local\Temp\pip-pip-egg-info-elosrn6m'
cwd: C:\Users\METİNUSTA\AppData\Local\Temp\pip-install-8iv10tb_\matplotlib\
Complete output (99 lines):
WARNING: Missing build requirements in pyproject.toml for numpy>=1.15 from https://files.pythonhosted.org/packages/bf/e8/15aea783ea72e2d4e51e3ec365e8dc4a1a32c9e5eb3a6d695b0d58e67cdd/numpy-1.19.2.zip#sha256=0d310730e1e793527065ad7dde736197b705d0e4c9999775f212b03c44a8484c.
WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'setuptools>=40.8.0' and 'wheel'.
ERROR: Command errored out with exit status 1:
command: 'd:\python\python39\python.exe' 'd:\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\METNUS~1\AppData\Local\Temp\tmpqz3brme_'
cwd: C:\Users\METİNUSTA\AppData\Local\Temp\pip-wheel-l2wpf1i8\numpy
Complete output (49 lines):
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xdd in position 0: unexpected end of data (sitecustomize.py, line 21)
Running from numpy source directory.
setup.py:470: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xdd in position 0: unexpected end of data (sitecustomize.py, line 21)
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Traceback (most recent call last):
File "C:\Users\METİNUSTA\AppData\Local\Temp\pip-wheel-l2wpf1i8\numpy\tools\cythonize.py", line 59, in process_pyx
from Cython.Compiler.Version import version as cython_version
ModuleNotFoundError: No module named 'Cython'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\METİNUSTA\AppData\Local\Temp\pip-wheel-l2wpf1i8\numpy\tools\cythonize.py", line 235, in <module>
main()
File "C:\Users\METİNUSTA\AppData\Local\Temp\pip-wheel-l2wpf1i8\numpy\tools\cythonize.py", line 231, in main
find_process_files(root_dir)
File "C:\Users\METİNUSTA\AppData\Local\Temp\pip-wheel-l2wpf1i8\numpy\tools\cythonize.py", line 222, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File "C:\Users\METİNUSTA\AppData\Local\Temp\pip-wheel-l2wpf1i8\numpy\tools\cythonize.py", line 188, in process
processor_function(fromfile, tofile)
File "C:\Users\METİNUSTA\AppData\Local\Temp\pip-wheel-l2wpf1i8\numpy\tools\cythonize.py", line 64, in process_pyx
raise OSError('Cython needs to be installed in Python as a module')
OSError: Cython needs to be installed in Python as a module
Cythonizing sources
Traceback (most recent call last):
File "d:\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "d:\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "d:\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "d:\python\python39\lib\site-packages\setuptools\build_meta.py", line 161, in prepare_metadata_for_build_wheel
self.run_setup()
File "d:\python\python39\lib\site-packages\setuptools\build_meta.py", line 253, in run_setup
super(_BuildMetaLegacyBackend,
File "d:\python\python39\lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 499, in <module>
setup_package()
File "setup.py", line 479, in setup_package
generate_cython()
File "setup.py", line 274, in generate_cython
raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\python\python39\python.exe' 'd:\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\METNUS~1\AppData\Local\Temp\tmpqz3brme_' Check the logs for full command output.
Traceback (most recent call last):
File "d:\python\python39\lib\site-packages\setuptools\installer.py", line 126, in fetch_build_egg
subprocess.check_call(cmd)
File "d:\python\python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['d:\\python\\python39\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\METNUS~1\\AppData\\Local\\Temp\\tmppoh8r2c9', '--quiet', 'numpy>=1.15']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\METİNUSTA\AppData\Local\Temp\pip-install-8iv10tb_\matplotlib\setup.py", line 242, in <module>
setup( # Finally, pass this all along to distutils to do the heavy lifting.
File "d:\python\python39\lib\site-packages\setuptools\__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "d:\python\python39\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "d:\python\python39\lib\site-packages\setuptools\dist.py", line 673, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "d:\python\python39\lib\site-packages\pkg_resources\__init__.py", line 764, in resolve
dist = best[req.key] = env.best_match(
File "d:\python\python39\lib\site-packages\pkg_resources\__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "d:\python\python39\lib\site-packages\pkg_resources\__init__.py", line 1061, in obtain
return installer(requirement)
File "d:\python\python39\lib\site-packages\setuptools\dist.py", line 732, in fetch_build_egg
return fetch_build_egg(self, req)
File "d:\python\python39\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['d:\\python\\python39\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\METNUS~1\\AppData\\Local\\Temp\\tmppoh8r2c9', '--quiet', 'numpy>=1.15']' returned non-zero exit status 1.
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.3.2]
python: yes [3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC
v.1927 64 bit (AMD64)]]
platform: yes [win32]
sample_data: yes [installing]
tests: no [skipping due to configuration]
macosx: no [Mac OS-X only]
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
python -m pip install --upgrade pip
pip install matplotlib==3.3.1
Worked for me.
edit: matplotlib has now released wheels for python 3.9 so pip install --upgrade matplotlib should work.
original answer
matplotlib hasn't made a wheel yet for version 3.9 so your python attempted to build it from source. You should downgrade to python 3.8 and then everything should work
This is because matplotlib has no 3.9 wheels ..
For convenience in the use of matplotlib, you can install anaconda.
In anaconda environment matplotlib, numpy and pandas are available by default for Python installed in Anaconda.
Or you can use lower versions of Python.
Install it from the source (Python >= 3.9.2):
git clone git://github.com/matplotlib/matplotlib.git
and build and install with:
cd matplotlib
python -mpip install .
If you want to be able to follow the development branch as it changes just replace the last step with:
python -mpip install -e .
Source and more information here: https://matplotlib.org/stable/faq/installing_faq.html#install-from-git
Matplotlib has no wheel for python version 3.10.
If tried installing matplotlib in 3.10 version of python by
pip install matplotlib
Results in : Error: Building wheel for matplotlib (setup.py)..error
Matplotlib dependencies are met and they are as follow:
cycler = 0.10
kiwisolver = 1.0.1
numpy = 1.16
pillow = 6.2.0
pyparsing = 2.2.1
six = 1.5
python-dateutil = 2.7
Tried upgrading pip and install matplotlib
python -m pip install -U pip
python -m pip install -U matplotlib
Successfully installed pip-21.3.1
again it didn't install Matplotlib.
Hence Down-versioned Python to 3.9 and installed Matplotlib. For Python version upto 3.9 wheel is defined for Matplotlib, do use Python 3.9 and make sure pip is upgraded to available version it wont be problem to install matplotlib
Currently trying to install some web framework but it fails with following error. It also shows the same error when I try to install other packages as well. I can't figure out where it stems from. Any ideas would help a lot.
PS D:\Python_Programming_Zed_Show\Exersize_46\Python27_Projects\Exersize_48\Exersize_48> python -m pip install lpthw.web
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/late
st/development/release-process/#python-2-support
Collecting lpthw.web
Using cached https://files.pythonhosted.org/packages/52/0d/a200087bb551895143fedfb5f7df416ccb7ecb46428e04dd011a7ea19689/lpthw.web-1.1.tar.gz
ERROR: Command errored out with exit status 1:
command: 'D:\Python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'d:\\users\\arhitect\\appdata\\local\\temp\\pip-install-gj9eke\\lpthw.web\\setup.py'"'"'; __file__='"'"'d:\\users\\arhitect\\appdata\\local\\temp\\pip-install-gj9eke\\lpthw.web\\setup.py'"'"';f=getattr(tok
enize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: d:\users\arhitect\appdata\local\temp\pip-install-gj9eke\lpthw.web\
Complete output (28 lines):
running egg_info
creating pip-egg-info\lpthw.web.egg-info
writing pip-egg-info\lpthw.web.egg-info\PKG-INFO
writing top-level names to pip-egg-info\lpthw.web.egg-info\top_level.txt
writing dependency_links to pip-egg-info\lpthw.web.egg-info\dependency_links.txt
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "d:\users\arhitect\appdata\local\temp\pip-install-gj9eke\lpthw.web\setup.py", line 17, in <module>
platforms=["any"],
File "D:\Python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "D:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "D:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\setuptools\command\egg_info.py", line 177, in run
writer = ep.load(installer=installer)
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2241, in load
if require: self.require(env, installer)
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2254, in require
working_set.resolve(self.dist.requires(self.extras),env,installer)))
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2471, in requires
dm = self._dep_map
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2682, in _dep_map
self.__dep_map = self._compute_dependencies()
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2699, in _compute_dependencies
from _markerlib import compile as compile_marker
ImportError: No module named _markerlib
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
PS D:\Python_Programming_Zed_Show\Exersize_46\Python27_Projects\Exersize_48\Exersize_48>
The problematic import comes from distribute-0.7.3 which is outdated package and should not be used. Remove the directory d:\users\arhitect\downloads\distribute-0.7.3.
I am trying to deploy the app that they have mentioned in the getting started section. However I am getting error ModuleNotFoundError: No module named 'six'. The whole build log is mentioned below:
-----> Python app detected
-----> Installing python-3.6.1
-----> Installing pip
-----> Installing requirements with pip
Collecting dj-database-url==0.4.1 (from -r /tmp/build_1900e0c2c9d2dd1135d0cd7b517175ae/requirements.txt (line 1))
Downloading dj-database-url-0.4.1.tar.gz
Collecting Django==1.9.7 (from -r /tmp/build_1900e0c2c9d2dd1135d0cd7b517175ae/requirements.txt (line 2))
Downloading Django-1.9.7-py2.py3-none-any.whl (6.6MB)
Collecting gunicorn==19.6.0 (from -r /tmp/build_1900e0c2c9d2dd1135d0cd7b517175ae/requirements.txt (line 3))
Downloading gunicorn-19.6.0-py2.py3-none-any.whl (114kB)
Collecting psycopg2==2.6.2 (from -r /tmp/build_1900e0c2c9d2dd1135d0cd7b517175ae/requirements.txt (line 4))
Downloading psycopg2-2.6.2.tar.gz (376kB)
Collecting whitenoise==2.0.6 (from -r /tmp/build_1900e0c2c9d2dd1135d0cd7b517175ae/requirements.txt (line 5))
Downloading whitenoise-2.0.6-py2.py3-none-any.whl
Installing collected packages: dj-database-url, Django, gunicorn, psycopg2, whitenoise
Running setup.py install for dj-database-url: started
Running setup.py install for dj-database-url: finished with status 'error'
Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-vkji1x5w/dj-database-url/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-e09119wj-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
copying dj_database_url.py -> build/lib
running egg_info
writing dj_database_url.egg-info/PKG-INFO
writing dependency_links to dj_database_url.egg-info/dependency_links.txt
writing top-level names to dj_database_url.egg-info/top_level.txt
reading manifest file 'dj_database_url.egg-info/SOURCES.txt'
writing manifest file 'dj_database_url.egg-info/SOURCES.txt'
running install_lib
copying build/lib/dj_database_url.py -> /app/.heroku/python/lib/python3.6/site-packages
byte-compiling /app/.heroku/python/lib/python3.6/site-packages/dj_database_url.py to dj_database_url.cpython-36.pyc
running install_egg_info
Copying dj_database_url.egg-info to /app/.heroku/python/lib/python3.6/site-packages/dj_database_url-0.4.1-py3.6.egg-info
running install_scripts
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-vkji1x5w/dj-database-url/setup.py", line 89, in <module>
'Programming Language :: Python :: 3.5',
File "/app/.heroku/python/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/app/.heroku/python/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/app/.heroku/python/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/app/.heroku/python/lib/python3.6/distutils/command/install.py", line 557, in run
self.run_command(cmd_name)
File "/app/.heroku/python/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/app/.heroku/python/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/install_scripts.py", line 17, in run
import setuptools.command.easy_install as ei
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 49, in <module>
from setuptools.py27compat import rmtree_safe
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/py27compat.py", line 7, in <module>
import six
ModuleNotFoundError: No module named 'six'
----------------------------------------
Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-vkji1x5w/dj-database-url/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-e09119wj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-vkji1x5w/dj-database-url/
! Push rejected, failed to compile Python app.
! Push failed
I have even installed the six module but it's not working.
You (alongwith with a lot of others) are facing this issue
upgrade your CI environment to just short of v36 with the following pre-install command:
pip install --upgrade "setuptools < 36"
Then, by ensure that your soon-to-be-created virtualenv inherited that version with the following environment variable:
VIRTUALENV_NO_DOWNLOAD=1
Another fix is by installing the module six before running any other command.
The official response in the Github repo has been that it will be fixed asap.
Hope it works. Cheers!