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...
Related
As part of a script I am writing, I need to install the package autodock vina for the purpose of ligand and protein binding. Every time I attempt to "pip install vina", I recieve an error message " ValueError: Boost library location was not found!". Upon attempting to install boost manually, I have been unable to run the bootstrap file, as it does not make the b2 folder that online tutorials say it will make.
To resolve this issue, I installed conda, and made an active environment with every single prerequisite, including boost, installed. I have checked for the version of all of these prerequisites and confirmed their existence, as well as double and triple-checking that I am in the write active environment. Upon installation, I either get the same issue (using conda install vina) or when using "conda install -c bioconda autodock-vina", I get a message saying that the package does not exist (despite adding cforge and bioconda as active package handlers, and the existence of said package is clearly documented online). Does anyone have any suggestions? I've been attempting to install this piece of software for 3 days and I've completely exhausted the documentation, as well as all other similar question answers, with nothing working.
Full error message:
Collecting vina
Using cached vina-1.2.3.tar.gz (95 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [56 lines of output]
Version found 1.2.3 (from __init__.py)
running egg_info
creating vina.egg-info
writing vina.egg-info\PKG-INFO
writing dependency_links to vina.egg-info\dependency_links.txt
writing requirements to vina.egg-info\requires.txt
writing top-level names to vina.egg-info\top_level.txt
writing manifest file 'vina.egg-info\SOURCES.txt'
Boost library is not installed in this conda environment.
Traceback (most recent call last):
File "C:\Users\chris\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\chris\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\chris\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\build_meta.py", line 177, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\build_meta.py", line 159, in _get_build_requires
self.run_setup()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 346, in <module>
setup(
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
return run_commands(dist)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
dist.run_commands()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\dist.py", line 1214, in run_command
super().run_command(command)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 308, in run
self.find_sources()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 315, in find_sources
mm.run()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 550, in run
self.add_defaults()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 587, in add_defaults
sdist.add_defaults(self)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 228, in add_defaults
self._add_defaults_ext()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 311, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "setup.py", line 247, in finalize_options
raise ValueError(error_msg)
ValueError: Boost library location was not found!
Directories searched: conda env, /usr/local/include and /usr/include.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I also get this error. I asked ResearchGate how to solve this problem and Cheng Shen adviced to use WSL/WSL2 to simulate a Linux environment and then run conda install -c bioconda vina (or another command like this)
What I did.
Install WSL and Ubuntu on Windows 2. Run code . in WSL terminal (for installing VS Code [recommended])
Install Anaconda/Miniconda following this guide
Type conda install -c bioconda vina in Ubuntu terminal (bioconda channel will download all required packages - boost, swig, etc.)
Vina should be successfully installed ( vina --version in WSL Terminal to check)
I found it much easier to install packages for docking via WSL and use VS Code to run scripts there. It's VERY easier than trying to solve this problem by configuring boost for Windows. If you have any questions you can ask me in ResearchGate.
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
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
I am installing qark in my pc(Windows 7) for testing purpose. I have installed python 3.7.2 and pip 19.2.3. For next step, I have to install the requirement.txt file while installing, an error occurred(Command errored out with exit status 1:) full error I will give below.
I tried installing it again but error was same I don't know what should I do. Help me.
Thank you
ERROR: Command errored out with exit status 1:
command: 'c:\users\hp\appdata\local\programs\python\python37\python.exe' -c
'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HP\\AppData\\L
ocal\\Temp\\pip-install-6tjj0pbq\\cffi\\setup.py'"'"'; __file__='"'"'C:\\Users\\
HP\\AppData\\Local\\Temp\\pip-install-6tjj0pbq\\cffi\\setup.py'"'"';f=getattr(to
kenize, '"'"'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: C:\Users\HP\AppData\Local\Temp\pip-install-6tjj0pbq\cffi\
Complete output (27 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\HP\AppData\Local\Temp\pip-install-6tjj0pbq\cffi\setup.py",
line 120, in <module>
if sys.platform == 'win32' and uses_msvc():
File "C:\Users\HP\AppData\Local\Temp\pip-install-6tjj0pbq\cffi\setup.py",
line 98, in uses_msvc
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\com
mand\config.py", line 227, in try_compile
self._compile(body, headers, include_dirs, lang)
File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\com
mand\config.py", line 133, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\_ms
vccompiler.py", line 345, in compile
self.initialize()
File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\_ms
vccompiler.py", line 238, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 185, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 1228, in return_env
self.OSIncludes,
File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 963, in OSIncludes
sdkver = self._sdk_subdir
File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 1057, in _sdk_subdir
ucrtver = self.si.WindowsSdkLastVersion
File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 604, in WindowsSdkLastVersion
self.WindowsSdkDir, 'lib'))
File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 809, in _use_last_dir_name
for dir_name in reversed(os.listdir(path))
FileNotFoundError: [WinError 3] The system cannot find the path specified: '
C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check th
e logs for full command output.
I also had a similar problem in which the cmd/PowerShell told me that I was missing a version of Windows Visual C++, so I followed what was written on THIS site, so I didn't have this problem anymore (I also rebooted, for safety):
Install using any ONE of these choices:
Microsoft Build Tools for Visual Studio
Alternative link to Microsoft Build Tools for Visual Studio.
Offline installer: vs_buildtools.exe
Select: Workloads → C++ build tools.
Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10). Optionally, if you want to use MSVC cl.exe C/C++ compiler from the command line, additionally select the C++ build tools, which takes an additional 2 GB disk space.
Moreover, to avoid problems I preferred to install Python 2.7.13 or 3.6
because they are the ones with which it has been tested (as indicated by the requirements on the github page).
After which (again according to the instructions) I installed QARK using:
pip install -r requirements.txt
pip install . --user
In the end, to make it work I had to put in the path of the environment variables these definitions:
C:\Users\user\AppData\Roaming\Python\Scripts (if you are using Python 2.x.x)
C:\Users\utente\AppData\Roaming\Python\Python36\Scripts (if you are using Python 3.x.x)
After that I didn't have any problems running it.
I hope I have been helpful! 🤞
I have set Canopy as my default python compiler.
I want to install scikits modules, currently not available in Canopy Package manager. I have installed setup tools and easy_install, pip which points to Canopy installation ( which easy_install -> Canopy directory). But I cannot use either of them to download any of the above modules.
More specifically fetching scikits.odes gives me this error log:
Cleaning up...
Removing temporary dir /private/var/folders/b3/cvy2g4393534zjsrgxgnmvch0000gn/T/pip_build_nick...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/b3/cvy2g4393534zjsrgxgnmvch0000gn/T/pip_build_nick/scikits.odes
Exception information:
Traceback (most recent call last):
File "/Users/nick/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/basecommand.py", line 134, in main
status = self.run(options, args)
File "/Users/nick/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/commands/install.py", line 236, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/nick/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 1134, in prepare_files
req_to_install.run_egg_info()
File "/Users/nick/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 259, in run_egg_info
command_desc='python setup.py egg_info')
File "/Users/nick/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/util.py", line 670, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /private/var/folders/b3/cvy2g4393534zjsrgxgnmvch0000gn/T/pip_build_nick/scikits.odes
Similar error logs were thrown for the other module installation attempts I had made.
Any suggestions? How can I fix this obvious bug?
I suspect that by installing setuptools, you have corrupted the version of easy_install that is already included in in the distribute package, which is part of Canopy. I have updated this article to emphasize this caution.
Please delete your Canopy User Python directory, /Users/nick/Library/Enthought/Canopy_64bit/User/ and restart Canopy to re-create it without the conflicting version of setuptools. Then easy_install pip from terminal, and try again.
I am not sure if this will suffice, but it will be a step at least.