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
Related
The final goal was to have a working environment with: Tensorflow, numpy, pandas, pyqt5, psycopg2. I successfully installed TF, numpy and pandas but not pyqt5. That's what I did:
Installed X-Code command tools
Installed miniforge
installed Tensorflow via pip:
pip install --upgrade --force --no-dependencies https://github.com/apple/tensorflow_macos/releases/download/v0.1alpha3/tensorflow_macos-0.1a3-cp38-cp38-macosx_11_0_arm64.whl https://github.com/apple/tensorflow_macos/releases/download/v0.1alpha3/tensorflow_addons_macos-0.1a3-cp38-cp38-macosx_11_0_arm64.whl.
4. Installed pandas and numpy.
5. TRIED to install pyqt5 via conda install with:
(1)conda install --name new_env pyqt5
(2)conda install --name new_env -c conda-forge pyqt5
(3)pip install pyqt
(4)pip install pyqt5
But none of that worked out. For commands (1) and (2) came out:
"PackagesNotFoundError: The following packages are not available from current channels:
pyqt
Current channels:
https://conda.anaconda.org/conda-forge/osx-arm64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/osx-arm64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-arm64
https://repo.anaconda.com/pkgs/r/noarch
While for (4) command:
ERROR: Could not find a version that satisfies the requirement pyqt (from versions: none)
ERROR: No matching distribution found for pyqt
and (5):
ERROR: Command errored out with exit status 1:
command: /Users/stefanozimmitti/miniforge3/envs/new_env/bin/python3.8 /Users/stefanozimmitti/miniforge3/envs/new_env/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/7p/vn4_9dqx69z015z9jy8m3wbh0000gn/T/tmpmwnbekdr
cwd: /private/var/folders/7p/vn4_9dqx69z015z9jy8m3wbh0000gn/T/pip-install-cp4t3jsy/pyqt5
Complete output (31 lines):
Traceback (most recent call last):
File "/Users/stefanozimmitti/miniforge3/envs/new_env/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 126, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/stefanozimmitti/miniforge3/envs/new_env/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/Users/stefanozimmitti/miniforge3/envs/new_env/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/stefanozimmitti/miniforge3/envs/new_env/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 130, in prepare_metadata_for_build_wheel
return _get_wheel_metadata_from_wheel(backend, metadata_directory,
File "/Users/stefanozimmitti/miniforge3/envs/new_env/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 159, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/private/var/folders/7p/vn4_9dqx69z015z9jy8m3wbh0000gn/T/pip-build-env-qeibpe1m/overlay/lib/python3.8/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/private/var/folders/7p/vn4_9dqx69z015z9jy8m3wbh0000gn/T/pip-build-env-qeibpe1m/overlay/lib/python3.8/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/private/var/folders/7p/vn4_9dqx69z015z9jy8m3wbh0000gn/T/pip-build-env-qeibpe1m/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 481, in setup
self.apply_user_defaults(tool)
File "project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "/private/var/folders/7p/vn4_9dqx69z015z9jy8m3wbh0000gn/T/pip-build-env-qeibpe1m/overlay/lib/python3.8/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "/private/var/folders/7p/vn4_9dqx69z015z9jy8m3wbh0000gn/T/pip-build-env-qeibpe1m/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 227, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/private/var/folders/7p/vn4_9dqx69z015z9jy8m3wbh0000gn/T/pip-build-env-qeibpe1m/overlay/lib/python3.8/site-packages/pyqtbuild/builder.py", line 66, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/stefanozimmitti/miniforge3/envs/new_env/bin/python3.8 /Users/stefanozimmitti/miniforge3/envs/new_env/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/7p/vn4_9dqx69z015z9jy8m3wbh0000gn/T/tmpmwnbekdr Check the logs for full command output.
I tried to be as specific as possible, my final goal was having a working version of Tensorflow on my Mac M1, along with a couple more packages like pandas, numpy, PyQT5 and psycopg2.
I succeded to install Tensorflow, pandas and numpy, need help on PyQt5
Try with
conda update --all
conda install qt
conda install pyqt
I think this should work for the installation of PyQt5.
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install pyqt
This should be done prior to using pip, as stated here.
I'm trying to update AWS CLI to the latest version. I'm following the below AWS documentation:
Aws cli upgrade with sudo access
When I run the command:
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
I get a long python error, which I can't understand. What is the problem here?
Error message:
Deprecated Python version detected: Python 2.7
Starting July 15, 2021, the AWS CLI will no longer support this version of Python. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.6 or later. More information can be found here: https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/
Running cmd: /bin/python virtualenv.py --no-download --python /bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-binary :all: --no-cache-dir --no-index --find-links file://. setuptools_scm-3.3.3.tar.gz
Traceback (most recent call last):
File "./awscli-bundle/install", line 270, in <module>
main()
File "./awscli-bundle/install", line 247, in main
pip_install_packages(opts.install_dir)
File "./awscli-bundle/install", line 167, in pip_install_packages
_install_setup_deps(pip_script, '.')
File "./awscli-bundle/install", line 184, in _install_setup_deps
pip_script, setup_package_dir, setuptools_scm_tarball))
File "./awscli-bundle/install", line 90, in run
p.returncode, cmd, output))
__main__.BadRCError: Bad rc (1) for cmd '/usr/local/aws/bin/pip install --no-binary :all: --no-cache-dir --no-index --find-links file://. setuptools_scm-3.3.3.tar.gz': Looking in links: file://.
Processing ./setuptools_scm-3.3.3.tar.gz
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/latest/development/release-process/#python-2-support
ERROR: Command errored out with exit status 1:
command: /usr/local/aws/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-M9znG_/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-M9znG_/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-req-build-M9znG_/pip-egg-info
cwd: /tmp/pip-req-build-M9znG_/
Complete output (36 lines):
running egg_info
creating /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info
writing /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/PKG-INFO
writing top-level names to /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/top_level.txt
writing dependency_links to /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/dependency_links.txt
writing entry points to /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/entry_points.txt
writing manifest file '/tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-M9znG_/setup.py", line 118, in <module>
setuptools.setup(**arguments)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 296, in run
self.find_sources()
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
mm.run()
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 534, in run
self.add_defaults()
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 574, in add_defaults
rcfiles = list(walk_revctrl())
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/sdist.py", line 20, in walk_revctrl
for item in ep.load()(dirname):
File "/tmp/pip-req-build-M9znG_/src/setuptools_scm/integration.py", line 22, in find_files
command = ep.load()
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2453, in resolve
raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'FILES_COMMAND'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info 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)
I am trying to install the python module pyobjus (this is the one that fails to install another module).
But I always get some bug during installation. I tried to switch to other python versions, reinstall pip, use option --no-cache-dir, etc, but couldn't manage to get past this bug:
$ pip3 install pyobjus
Defaulting to user installation because normal site-packages is not writeable
Collecting pyobjus
Using cached pyobjus-1.2.0.tar.gz (165 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /home/denis/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpoff64vmf
cwd: /tmp/pip-install-4k26drr5/pyobjus
Complete output (19 lines):
Pyobjus platform is linux
Traceback (most recent call last):
File "/home/denis/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/home/denis/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/denis/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-35d2l6hi/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 150, in get_requires_for_build_wheel
config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-35d2l6hi/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 130, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-35d2l6hi/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 254, in run_setup
self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-35d2l6hi/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 35, in <module>
class PyObjusBuildExt(build_ext, object):
NameError: name 'build_ext' is not defined
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /home/denis/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpoff64vmf Check the logs for full command output.
Any help would be greatly appreciated.
My OS is Linux Mint 19.3.
I saw this question which is about the same problem, but following the links did not bring any answer. It says PyObjus is designed for MacOS, but then why does the module katrain, supposedly compatible with linux, tries to install it when running "pip3 install katrain" (giving the same error as above) ?
Edit adter Marat's suggestion:
I removed the test for ios, the installation goes a bit further, but fails because Python.h is missing. when trying to install python3-dev, apt-get says that broken packages such as python3.6-dev are flagged "left as is", so it cannot install the required ones. Is there a way to fix the python installation, which seems to be broken ? I am afraid to break all the system if I mess up with it too much, but there is clearly a problem with my installation...
Fixed the above issue by reinstalling stuff, now it is CoreFoundation.h that is missing...
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