Error when trying to install scipy with docker - python-3.x

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!

Related

macOS Monterey - Install Scipy Error "No lapack/blas resources found"

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.

This error originates from a subprocess, and is likely not a problem with pip

Hello An error was reported when pip install pandas, and the installation could not be successful. Linux system: alpine linux
root#qinglong:/ql/config $ pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pandas
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4d/aa/e7078569d20f45e8cf6512a24bf2945698f13a7975650773c01366ea96dc/pandas-1.4.0.tar.gz (4.9 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [272 lines of output]
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting setuptools>=51.0.0
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ad/65/7b98718c0ecebbdae5a5251fffc43dd3800ff3d1a6f7cc1aa09cfbcf17a5/setuptools-60.8.2-py3-none-any.whl (1.1 MB)
Collecting wheel
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting Cython<3,>=0.29.24
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6f/f5/18bb7c9b9e992141f4212dc358a7b06d24c79dee6b9c51658c7e86c767e1/Cython-0.29.27-cp39-cp39-musllinux_1_1_x86_64.whl (2.1 MB)
Collecting oldest-supported-numpy>=0.10
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/45/77/6ccb4e20a4e86e8711c512ae88bd7db8d8e895692eba8c2f519eccbb619e/oldest_supported_numpy-2022.1.30-py3-none-any.whl (3.9 kB)
Collecting numpy==1.19.3
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cb/c0/7b3d69e6ee68bc54c97ba51f8c3c3e43ff1dbc7bd97347cc19a1f944e60a/numpy-1.19.3.zip (7.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [240 lines of output]
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()
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_generator.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/_bounded_integers.pyx.in
Processing numpy/random/mtrand.pyx
Processing numpy/random/_common.pyx
Processing numpy/random/_mt19937.pyx
Processing numpy/random/_philox.pyx
Processing numpy/random/_sfc64.pyx
Processing numpy/random/_pcg64.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
blis_info:
libraries blis not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/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):
blas_info:
libraries blas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/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):
blas_src_info:
NOT AVAILABLE
/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/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):
NOT AVAILABLE
non-existing path in 'numpy/distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
flame_info:
libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in /usr/local/lib
libraries tatlas,tatlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries tatlas,tatlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib/
libraries tatlas,tatlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
libraries lapack_atlas not found in /usr/local/lib
libraries satlas,satlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries satlas,satlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib/
libraries satlas,satlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in /usr/local/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib/
libraries ptf77blas,ptcblas,atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries lapack_atlas not found in /usr/local/lib
libraries f77blas,cblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries f77blas,cblas,atlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib/
libraries f77blas,cblas,atlas not found in /usr/lib/
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/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))()
lapack_src_info:
NOT AVAILABLE
/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/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))()
NOT AVAILABLE
numpy_linalg_lapack_lite:
FOUND:
language = c
define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
/usr/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running dist_info
running build_src
build_src
building py_modules sources
creating build
creating build/src.linux-x86_64-3.9
creating build/src.linux-x86_64-3.9/numpy
creating build/src.linux-x86_64-3.9/numpy/distutils
building library "npymath" sources
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable lf95
Could not locate executable pgfortran
Could not locate executable nvfortran
Could not locate executable f90
Could not locate executable f77
Could not locate executable fort
Could not locate executable efort
Could not locate executable efc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pathf95
Could not locate executable nagfor
don't know how to compile Fortran code on platform 'posix'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lssp_nonshared
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
File "/tmp/tmpoawf0bs0_in_process.py", line 363, in <module>
main()
File "/tmp/tmpoawf0bs0_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/tmpoawf0bs0_in_process.py", line 164, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-76dejotd/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-76dejotd/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-76dejotd/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 508, in <module>
setup_package()
File "setup.py", line 500, in setup_package
setup(**metadata)
File "/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/tmp/pip-build-env-76dejotd/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-76dejotd/overlay/lib/python3.9/site-packages/setuptools/command/dist_info.py", line 31, in run
egg_info.run()
File "/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/numpy/distutils/command/egg_info.py", line 24, in run
self.run_command("build_src")
File "/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/numpy/distutils/command/build_src.py", line 144, in run
self.build_sources()
File "/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/numpy/distutils/command/build_src.py", line 155, in build_sources
self.build_library_sources(*libname_info)
File "/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/numpy/distutils/command/build_src.py", line 288, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "/tmp/pip-install-tri9ob95/numpy_2637367dd1c74d4f9aac9b92245d9ad0/numpy/distutils/command/build_src.py", line 378, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 663, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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.
root#qinglong:/ql/config $
root#qinglong:/ql/config $
root#qinglong:/ql/config $

Can't install Matplotlib on Python 3.10 after its release (2021-10-05)

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.

Module installation Problem in Pypy Windows 10

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.

Scipy error in python:3.8-alpine3.11 - No lapack/blas resources found

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.

Resources