I have installed pyenv on Mac using brew install pyenv. I want to run a python project which requires installation of scipy==1.5.4. I tried installing it using the command pip3 install scipy==1.5.4 but I got an error No lapack/blas resources found.
To solve that I ran the following commands as suggested in the error and other solutions.
brew install openblas
Followed by:
export LDFLAGS="-L/usr/local/opt/openblas/lib"
export CPPFLAGS="-I/usr/local/opt/openblas/include"
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
Next I did
brew install lapack
Followed by
export LDFLAGS="-L/usr/local/opt/lapack/lib"
export CPPFLAGS="-I/usr/local/opt/lapack/include"
export PKG_CONFIG_PATH="/usr/local/opt/lapack/lib/pkgconfig"
Now that I've installed both blas and lapack I expected the error to go away but I am still facing similar error. How can I solve this?
PS
Complete Error
Running from SciPy source directory.
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas,lapack not found in ['/Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries tatlas,tatlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries lapack_atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
customize UnixCCompiler
libraries satlas,satlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries lapack_atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries lapack_atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries lapack_atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-build-env-n8dln98w/lib/python3.6/site-packages/numpy/distutils/system_info.py:624: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
lapack_info:
customize UnixCCompiler
libraries lapack not found in ['/Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-build-env-n8dln98w/lib/python3.6/site-packages/numpy/distutils/system_info.py:624: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
self.calc_info()
lapack_src_info:
NOT AVAILABLE
/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-build-env-n8dln98w/lib/python3.6/site-packages/numpy/distutils/system_info.py:624: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
self.calc_info()
NOT AVAILABLE
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/setup.py", line 583, in <module>
setup_package()
File "/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/setup.py", line 579, in setup_package
setup(**metadata)
File "/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-build-env-n8dln98w/lib/python3.6/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/setup.py", line 477, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found. Note: Accelerate is no longer supported.
----------------------------------------
Command "/Users/furqan/.pyenv/versions/3.6.13/envs/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-record-uy6kggfm/install-record.txt --single-version-externally-managed --compile --install-headers /Users/furqan/.pyenv/versions/3.6.13/envs/venv/include/site/python3.6/scipy" failed with error code 1 in /private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/
We had a similar issue when upgrading a Django app to use Python 3.8. The solution for us came out of this github thread. We're running on Big Sur so not sure if the same fix would work for you, but before you run your package install run export SYSTEM_VERSION_COMPAT=1. Again, not sure if this will solve in your context, but it worked for us.
Related
After the release of Python 3.10, I reinstalled my modules for the newest version and I'm getting some trouble. First of all I tried to pip Numpy as it's the required one for matplotlib. But I got this problem:
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
Even though unsuccessful, I tried to install Matplotlib.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\User\AppData\Local\Programs\Python\Python310\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-6mmzj8ln\\matplotlib_e4d8611ecbaa485193e456f5c8639d79\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-6mmzj8ln\\matplotlib_e4d8611ecbaa485193e456f5c8639d79\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');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-pip-egg-info-x6onvveu'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-6mmzj8ln\matplotlib_e4d8611ecbaa485193e456f5c8639d79\
Complete output (257 lines):
WARNING: The wheel package is not available.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\User\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmpywamgc6e'
cwd: C:\Users\User\AppData\Local\Temp\pip-wheel-1rd1a5_s\numpy_0a0aa0c0c565418fa8227e992c062b49
Complete output (208 lines):
setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10.
warnings.warn(
Running from numpy source directory.
C:\Users\User\AppData\Local\Temp\pip-wheel-1rd1a5_s\numpy_0a0aa0c0c565418fa8227e992c062b49\tools\cythonize.py:69: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import LooseVersion
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Processing numpy/random\mtrand.pyx
Processing numpy/random\_bounded_integers.pyx.in
Processing numpy/random\_common.pyx
Processing numpy/random\_generator.pyx
Processing numpy/random\_mt19937.pyx
Processing numpy/random\_pcg64.pyx
Processing numpy/random\_philox.pyx
Processing numpy/random\_sfc64.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
blis_info:
libraries blis not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
C:\Users\User\AppData\Local\Temp\pip-wheel-1rd1a5_s\numpy_0a0aa0c0c565418fa8227e992c062b49\numpy\distutils\system_info.py:2026: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
if self._calc_info(blas):
blas_info:
libraries blas not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
C:\Users\User\AppData\Local\Temp\pip-wheel-1rd1a5_s\numpy_0a0aa0c0c565418fa8227e992c062b49\numpy\distutils\system_info.py:2026: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
if self._calc_info(blas):
blas_src_info:
NOT AVAILABLE
C:\Users\User\AppData\Local\Temp\pip-wheel-1rd1a5_s\numpy_0a0aa0c0c565418fa8227e992c062b49\numpy\distutils\system_info.py:2026: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
if self._calc_info(blas):
NOT AVAILABLE
non-existing path in 'numpy\\distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
libraries mkl_rt not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
flame_info:
libraries flame not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\lib
libraries tatlas,tatlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\lib
libraries lapack_atlas not found in C:\
libraries tatlas,tatlas not found in C:\
libraries lapack_atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\libs
libraries tatlas,tatlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\libs
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
libraries lapack_atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\lib
libraries satlas,satlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\lib
libraries lapack_atlas not found in C:\
libraries satlas,satlas not found in C:\
libraries lapack_atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\libs
libraries satlas,satlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\libs
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\lib
libraries ptf77blas,ptcblas,atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\lib
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\libs
libraries ptf77blas,ptcblas,atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries lapack_atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\lib
libraries f77blas,cblas,atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\lib
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\libs
libraries f77blas,cblas,atlas not found in C:\Users\User\AppData\Local\Programs\Python\Python310\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
C:\Users\User\AppData\Local\Temp\pip-wheel-1rd1a5_s\numpy_0a0aa0c0c565418fa8227e992c062b49\numpy\distutils\system_info.py:1858: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
lapack_src_info:
NOT AVAILABLE
C:\Users\User\AppData\Local\Temp\pip-wheel-1rd1a5_s\numpy_0a0aa0c0c565418fa8227e992c062b49\numpy\distutils\system_info.py:1858: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
NOT AVAILABLE
numpy_linalg_lapack_lite:
FOUND:
language = c
define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
Warning: attempted relative import with no known parent package
C:\Users\User\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build\src.win-amd64-3.10
creating build\src.win-amd64-3.10\numpy
creating build\src.win-amd64-3.10\numpy\distutils
building library "npymath" sources
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for numpy
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\installer.py", line 75, in fetch_build_egg
subprocess.check_call(cmd)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\User\\AppData\\Local\\Temp\\tmpsew9x6oz', '--quiet', 'numpy>=1.16']' 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\User\AppData\Local\Temp\pip-install-6mmzj8ln\matplotlib_e4d8611ecbaa485193e456f5c8639d79\setup.py", line 258, in <module>
setup( # Finally, pass this all along to distutils to do the heavy lifting.
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 785, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 766, in resolve
dist = best[req.key] = env.best_match(
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 1051, in best_match
return self.obtain(req, installer)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 1063, in obtain
return installer(requirement)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 844, in fetch_build_egg
return fetch_build_egg(self, req)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\installer.py", line 77, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\User\\AppData\\Local\\Temp\\tmpsew9x6oz', '--quiet', 'numpy>=1.16']' returned non-zero exit status 1.
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.4.2]
python: yes [3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC
v.1929 64 bit (AMD64)]]
platform: yes [win32]
tests: no [skipping due to configuration]
macosx: no [Mac OS-X only]
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/60/d3/286925802edaeb0b8834425ad97c9564ff679eb4208a184533969aa5fc29/matplotlib-3.4.2.tar.gz#sha256=d8d994cefdff9aaba45166eb3de4f5211adb4accac85cbf97137e98f26ea0219 (from https://pypi.org/simple/matplotlib/) (requires-python:>=3.7). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I also tried to install from source like this and got the same error:
git clone https://github.com/matplotlib/matplotlib.git
cd matplotlib
python -m pip install -e .
Have I made some mistake?
As others have stated, Python 3.10 is not currently compatible with Matplotlib.
You need to install and use Python 3.9 until it is supported. Until then you have a few options:
Windows
You can use the Python Launcher for Windows (py.exe) script to choose which Python version to run like so:
py.exe script help:
py -h
List all installed versions
py -0
Use a specified version
py -3.9
e.g. 1
Create a virtual environment using python 3.9
py -3.9 venv .venv
e.g. 2
install matplotlib with pip using python 3.9
py -3.9 -m pip install matplotlib
Linux
On Linux you can run whatever Python version you like like so:
python3.9
You can set up a local (your working directory and all sub-directories) virtual environment that will use your specified version like so:
python3.9 -m venv .venv
Which will set the version of python used to 3.9 while in the local directory, and allow you to type python instead of python3.9 each time you need it.
Another relevant and helpful post by Rotareti here.
Please note that I have not described how to activate and use Python Virtual Environments here in detail, for more information on using them read the python docs.
Reference this answer if you're interested in installing a matplotlib release candidate.
python -m pip install -ve
And a few extra characters just so it will go through.
I am using the latest (still demo, but yet the last version before the release) python - which is 3.10.0rc2.
I have issues with installing standard libraries such as numpy. I am using pip install, python -m pip etc.
cmd output:
Collecting numpy
Using cached numpy-1.21.2.zip (10.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: numpy
Building wheel for numpy (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mateu\appdata\local\programs\python\python310\python.exe' 'c:\users\mateu\appdata\local\programs\python\python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\mateu\AppData\Local\Temp\tmpg9tjgygv'
cwd: C:\Users\mateu\AppData\Local\Temp\pip-install-c3kg6xo0\numpy_a0f8cbcefbea46f59d0a8ef8b828b848
Complete output (208 lines):
setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10.
warnings.warn(
Running from numpy source directory.
C:\Users\mateu\AppData\Local\Temp\pip-install-c3kg6xo0\numpy_a0f8cbcefbea46f59d0a8ef8b828b848\tools\cythonize.py:69: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import LooseVersion
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Processing numpy/random\mtrand.pyx
Processing numpy/random\_bounded_integers.pyx.in
Processing numpy/random\_common.pyx
Processing numpy/random\_generator.pyx
Processing numpy/random\_mt19937.pyx
Processing numpy/random\_pcg64.pyx
Processing numpy/random\_philox.pyx
Processing numpy/random\_sfc64.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
blis_info:
libraries blis not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
C:\Users\mateu\AppData\Local\Temp\pip-install-c3kg6xo0\numpy_a0f8cbcefbea46f59d0a8ef8b828b848\numpy\distutils\system_info.py:2026: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
if self._calc_info(blas):
blas_info:
libraries blas not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
C:\Users\mateu\AppData\Local\Temp\pip-install-c3kg6xo0\numpy_a0f8cbcefbea46f59d0a8ef8b828b848\numpy\distutils\system_info.py:2026: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
if self._calc_info(blas):
blas_src_info:
NOT AVAILABLE
C:\Users\mateu\AppData\Local\Temp\pip-install-c3kg6xo0\numpy_a0f8cbcefbea46f59d0a8ef8b828b848\numpy\distutils\system_info.py:2026: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
if self._calc_info(blas):
NOT AVAILABLE
non-existing path in 'numpy\\distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
libraries mkl_rt not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
flame_info:
libraries flame not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in c:\users\mateu\appdata\local\programs\python\python310\lib
libraries tatlas,tatlas not found in c:\users\mateu\appdata\local\programs\python\python310\lib
libraries lapack_atlas not found in C:\
libraries tatlas,tatlas not found in C:\
libraries lapack_atlas not found in c:\users\mateu\appdata\local\programs\python\python310\libs
libraries tatlas,tatlas not found in c:\users\mateu\appdata\local\programs\python\python310\libs
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
libraries lapack_atlas not found in c:\users\mateu\appdata\local\programs\python\python310\lib
libraries satlas,satlas not found in c:\users\mateu\appdata\local\programs\python\python310\lib
libraries lapack_atlas not found in C:\
libraries satlas,satlas not found in C:\
libraries lapack_atlas not found in c:\users\mateu\appdata\local\programs\python\python310\libs
libraries satlas,satlas not found in c:\users\mateu\appdata\local\programs\python\python310\libs
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in c:\users\mateu\appdata\local\programs\python\python310\lib
libraries ptf77blas,ptcblas,atlas not found in c:\users\mateu\appdata\local\programs\python\python310\lib
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in c:\users\mateu\appdata\local\programs\python\python310\libs
libraries ptf77blas,ptcblas,atlas not found in c:\users\mateu\appdata\local\programs\python\python310\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries lapack_atlas not found in c:\users\mateu\appdata\local\programs\python\python310\lib
libraries f77blas,cblas,atlas not found in c:\users\mateu\appdata\local\programs\python\python310\lib
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in c:\users\mateu\appdata\local\programs\python\python310\libs
libraries f77blas,cblas,atlas not found in c:\users\mateu\appdata\local\programs\python\python310\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\lib', 'C:\\', 'c:\\users\\mateu\\appdata\\local\\programs\\python\\python310\\libs']
NOT AVAILABLE
C:\Users\mateu\AppData\Local\Temp\pip-install-c3kg6xo0\numpy_a0f8cbcefbea46f59d0a8ef8b828b848\numpy\distutils\system_info.py:1858: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
lapack_src_info:
NOT AVAILABLE
C:\Users\mateu\AppData\Local\Temp\pip-install-c3kg6xo0\numpy_a0f8cbcefbea46f59d0a8ef8b828b848\numpy\distutils\system_info.py:1858: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
NOT AVAILABLE
numpy_linalg_lapack_lite:
FOUND:
language = c
define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
Warning: attempted relative import with no known parent package
c:\users\mateu\appdata\local\programs\python\python310\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build\src.win-amd64-3.10
creating build\src.win-amd64-3.10\numpy
creating build\src.win-amd64-3.10\numpy\distutils
building library "npymath" sources
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
Do you know if it is normal behaviour that the libraries cannot be installed? Is there any workaround?
What happens is that some libraries that require compiling, such as numpy, included the pre-compiled binaries inside the installer (wheel) file. But they won't include binaries for non-stable releases (or niche architectures) - instead, the same file has the source code and some of the resources needed to build the binaries on the client (computer that is installing the library) side.
The error indicates that: the binaries are not included, and building them on your computer failed, probably likely to the lack of a build environment.
Under Linux it is more or less simple to install everything needed to build numpy (and other libraries). Setting up such an environment on Windows computer can be somewhat complicated.
You'd be better looking for an unofficial build wheel with the package pre-compiled for Python 3.10 - if numpy is already working with 3.10, which might not be the case: while for most end-user code no changes are needed changing from Python 3.9 to 3.10, projects like numpy depend heavily on internal details of the language.
One of the mirrors which keep pre-compiled binaries for various Python package seems to have a numpy for Python 3.10 on windows: https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy (please note that while looking alright, there is no mechanism to verify these packages are not adulterated from the source code, as happens with all binary installs (binary installs from official sources usually will have hashes or other verifying mechanisms + the certificate chain to the domain/brand names) , so, while I personally would use packages from lfd.uci.edu, this is not risk free)
I am trying to install packages to my pypy module however it keeps giving me this error. I am interested in installing the pandas module however giving me this error. I am on a windows 10 setup. This is the cmd output of the error. The pypy module is installed in the correct full path and all but its giving me errors when pypy3 -m pip install numpy or pypy3 -m pip install pandas. Anything helps.
C:\Users\maste>pypy3 -m pip install numpy
Collecting numpy
Downloading numpy-1.19.4.zip (7.3 MB)
| | 7.3 MB 6.4 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\pypy3.exe' 'C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\maste\AppData\Local\Temp\tmpuja3njcr'
cwd: C:\Users\maste\AppData\Local\Temp\pip-install-enqvkl9m\numpy_8a18699305b847b3837072be339821a5
Complete output (191 lines):
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Processing numpy/random\mtrand.pyx
Processing numpy/random\_bounded_integers.pyx.in
Processing numpy/random\_common.pyx
Processing numpy/random\_generator.pyx
Processing numpy/random\_mt19937.pyx
Processing numpy/random\_pcg64.pyx
Processing numpy/random\_philox.pyx
Processing numpy/random\_sfc64.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
blis_info:
libraries blis not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Found executable C:\cygwin64\bin\DF.exe
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
blas_info:
libraries blas not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
NOT AVAILABLE
non-existing path in 'numpy\\distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
libraries mkl_rt not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
flame_info:
libraries flame not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in C:\
libraries tatlas,tatlas not found in C:\
libraries lapack_atlas not found in C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\libs
libraries tatlas,tatlas not found in C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\libs
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
libraries lapack_atlas not found in C:\
libraries satlas,satlas not found in C:\
libraries lapack_atlas not found in C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\libs
libraries satlas,satlas not found in C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\libs
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\libs
libraries ptf77blas,ptcblas,atlas not found in C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\libs
libraries f77blas,cblas,atlas not found in C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\\', 'C:\\Users\\maste\\AppData\\Local\\Temp\\RarEXa8572.21538\\pypy3.7-v7.3.3-win32\\libs']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
numpy_linalg_lapack_lite:
FOUND:
language = c
running dist_info
running build_src
build_src
building py_modules sources
creating build
creating build\src.win32-3.7
creating build\src.win32-3.7\numpy
creating build\src.win32-3.7\numpy\distutils
building library "npymath" sources
Running from numpy source directory.
setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
C:\Users\maste\AppData\Local\Temp\pip-install-enqvkl9m\numpy_8a18699305b847b3837072be339821a5\numpy\distutils\system_info.py:1914: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
if self._calc_info(blas):
C:\Users\maste\AppData\Local\Temp\pip-install-enqvkl9m\numpy_8a18699305b847b3837072be339821a5\numpy\distutils\system_info.py:1914: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
if self._calc_info(blas):
C:\Users\maste\AppData\Local\Temp\pip-install-enqvkl9m\numpy_8a18699305b847b3837072be339821a5\numpy\distutils\system_info.py:1914: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
if self._calc_info(blas):
C:\Users\maste\AppData\Local\Temp\pip-install-enqvkl9m\numpy_8a18699305b847b3837072be339821a5\numpy\distutils\system_info.py:1748: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
C:\Users\maste\AppData\Local\Temp\pip-install-enqvkl9m\numpy_8a18699305b847b3837072be339821a5\numpy\distutils\system_info.py:1748: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\lib-python\3\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\pypy3.exe' 'C:\Users\maste\AppData\Local\Temp\RarEXa8572.21538\pypy3.7-v7.3.3-win32\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\maste\AppData\Local\Temp\tmpuja3njcr' Check the logs for full command output.
why are you using pypy3???
just use pip install numpy , pip install pandas ... and so one.
I strongly recommend you uninstall python and all your packages and then reinstall them correctly, either from anaconda or python.org, and then use the commands from PyPi.org, for example for numpy, use this.
I've previously installed this docker image without issues, however when I try to install it now I get the following error when it tries to install scipy:
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmph2civzl1
cwd: /tmp/pip-install-bp21zk09/scipy
Complete output (139 lines):
setup.py:460: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-gbf8e3wg'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Running from SciPy source directory.
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
flame_info:
customize UnixCCompiler
libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
lapack_info:
customize UnixCCompiler
libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
/tmp/pip-build-env-dc7b76m7/overlay/lib/python3.9/site-packages/numpy/distutils/system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
lapack_src_info:
NOT AVAILABLE
/tmp/pip-build-env-dc7b76m7/overlay/lib/python3.9/site-packages/numpy/distutils/system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
NOT AVAILABLE
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-dc7b76m7/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 161, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-dc7b76m7/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 253, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-dc7b76m7/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 583, in <module>
setup_package()
File "setup.py", line 579, in setup_package
setup(**metadata)
File "/tmp/pip-build-env-dc7b76m7/overlay/lib/python3.9/site-packages/numpy/distutils/core.py", line 137, in setup
config = configuration()
File "setup.py", line 477, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmph2civzl1 Check the logs for full command output.
My dockerfile:
FROM python:3
# VOLUME path
# set a directory for the app
WORKDIR /usr/src/app
# copy all the files to the container
COPY . .
# install dependencies
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 8050
CMD ["python", "./app.py"]
Requirements file:
scipy
dash
dash_core_components
dash_html_components
plotly.express
pandas
dash_table
datetime
plotly
xlrd >= 1.0.0
matplotlib
dash_daq
datetime
openpyxl
dash_extensions
Any help appreciated!
I am trying to install scipy in python:3.8-alpine3.11, but getting "No lapack/blas resources found." It was working fine for alpien3.10.
Below are the logs:
Step 5/28 : RUN pip3 install numpy==1.14.3
---> Using cache
---> f77d037c9008
Step 6/28 : RUN pip3 install scipy==1.3.1
---> Running in 86d118b54acc
Looking in indexes: simple
Collecting scipy==1.3.1
Downloading scipy-1.3.1.tar.gz (23.6 MB)
Installing build dependencies: started
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.8 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp1qlw5c3z
cwd: /tmp/pip-install-cz2mzto6/scipy
Complete output (150 lines):
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
customize UnixCCompiler
C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC
creating /tmp/tmphgxupjii/tmp
creating /tmp/tmphgxupjii/tmp/tmphgxupjii
compile options: '-c'
gcc: /tmp/tmphgxupjii/source.c
gcc /tmp/tmphgxupjii/tmp/tmphgxupjii/source.o -L/usr/lib -lopenblas -o /tmp/tmphgxupjii/a.out
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/tmphgxupjii/tmp/tmphgxupjii/source.o: in function `main':
/tmp/tmphgxupjii/source.c:4: undefined reference to `zungqr_'
collect2: error: ld returned 1 exit status
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /tmp/tmphgxupjii/tmp/tmphgxupjii/source.o: in function `main':
/tmp/tmphgxupjii/source.c:4: undefined reference to `zungqr_'
collect2: error: ld returned 1 exit status
NOT AVAILABLE
openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib/
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib/
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib/
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib/
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
customize UnixCCompiler
libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
setup.py:386: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-oeuez3h_'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Running from scipy source directory.
/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:624: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:624: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
self.calc_info()
/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:624: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
self.calc_info()
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
main()
File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 156, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 242, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 505, in <module>
setup_package()
File "setup.py", line 501, in setup_package
setup(**metadata)
File "/tmp/pip-build-env-h5qyzy7s/overlay/lib/python3.8/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "setup.py", line 403, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.8 /usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp1qlw5c3z Check the logs for full command output.
The command '/bin/sh -c pip3 install scipy==1.3.1' returned a non-zero code: 1
I later used apk add py3-scipy, and it worked.
pip install scipy was throwing error in alpine because of missing of lapack package.
py3-scipy installing with all the dependent package.