How to install numpy with pip+mingw in windows? - windows

I have got pip+mingw working in windows. I tested it with
pip install cython
and it works perfectly.
pip install numpy
fails however with a long list of error messages. What is the correct way to do this or should I give up trying with pip?
Downloading/unpacking numpy
Running setup.py egg_info for package numpy
non-existing path in 'numpy\\distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
blas_info:
libraries blas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
NOT AVAILABLE
lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
build_src
building py_modules sources
building library "npymath" sources
No module named msvccompiler in numpy.distutils; trying from distutils
Running from numpy source directory.
c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1494: 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.
warnings.warn(AtlasNotFoundError.__doc__)
c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1503: 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.
warnings.warn(BlasNotFoundError.__doc__)
c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1506: 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.
warnings.warn(BlasSrcNotFoundError.__doc__)
c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1408: 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.
warnings.warn(AtlasNotFoundError.__doc__)
c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1419: 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.
warnings.warn(LapackNotFoundError.__doc__)
c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1422: 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.
warnings.warn(LapackSrcNotFoundError.__doc__)
error: Unable to find vcvarsall.bat
Complete output from command python setup.py egg_info:
non-existing path in 'numpy\\distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
blas_info:
libraries blas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
NOT AVAILABLE
lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
running egg_info
running build_src
build_src
building py_modules sources
building library "npymath" sources
No module named msvccompiler in numpy.distutils; trying from distutils
Running from numpy source directory.
c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1494: 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.
warnings.warn(AtlasNotFoundError.__doc__)
c:\users\marshall\appdata\local\temp\pip-build-marshall\numpy\numpy\distutils\system_info.py:1503: 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.
warnings.warn(BlasNotFoundError.__doc__)
c:\users\clifford\appdata\local\temp\pip-build-clifford\numpy\numpy\distutils\system_info.py:1506: 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.
warnings.warn(BlasSrcNotFoundError.__doc__)
c:\users\clifford\appdata\local\temp\pip-build-clifford\numpy\numpy\distutils\system_info.py:1408: 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.
warnings.warn(AtlasNotFoundError.__doc__)
c:\users\clifford\appdata\local\temp\pip-build-clifford\numpy\numpy\distutils\system_info.py:1419: 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.
warnings.warn(LapackNotFoundError.__doc__)
c:\users\clifford\appdata\local\temp\pip-build-clifford\numpy\numpy\distutils\system_info.py:1422: 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.
warnings.warn(LapackSrcNotFoundError.__doc__)
error: Unable to find vcvarsall.bat

pip is building Numpy from source and that's quite an undertaking. The failure at the end tells me that you may not have your compiler properly configured for distutils. I use the Windows SDK compiler myself: http://www.microsoft.com/en-us/download/details.aspx?id=8279
If you use this one, you should define the environment variables:
set MSSdk=1
set DISTUTILS_USE_SDK=1
Having said that, it's much easier to install Numpy and Scipy using one of the .msi installers which you can find here: http://scipy.org/Download.
Numpy relies on the BLAS linear algebra libraries and the build of those is highly technical and a build of Numpy from source on Windows is best avoided unless you have a good reason to do so.

Related

Why could GCC find the libraries for GMP, and MPFR, but not for the MPC?

I am trying a build gcc on my Mac it is an intel Mac. I do have these libraries, the libraries are here, so it is usr/local/lib for the libraries and the headers are here usr/local/include. I also successfully compiled and install gmp and mpfr accept the mpc for some reason it is not locating.
gcc error:
configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
https://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
Mpc error:
configure: error: gmp.h cannot be found or is unusable.

I'm having an error while deploying my app in heroku

ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp3b4z4ntu
cwd: /tmp/pip-install-1m_e8096/scipy
Complete output (171 lines):
setup.py:460: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-v__rgpzs'), 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 ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas,lapack not found in ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
flame_info:
customize UnixCCompiler
libraries flame not found in ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/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 /app/.heroku/python/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /app/.heroku/python/lib
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/lib64
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib64
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 /app/.heroku/python/lib
customize UnixCCompiler
libraries satlas,satlas not found in /app/.heroku/python/lib
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/lib64
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib64
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 /app/.heroku/python/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /app/.heroku/python/lib
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/lib64
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
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 /app/.heroku/python/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /app/.heroku/python/lib
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/lib64
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib64
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 ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
/tmp/pip-build-env-k61l7gdq/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-k61l7gdq/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 "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/app/.heroku/python/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-k61l7gdq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-k61l7gdq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 258, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-k61l7gdq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 150, 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-k61l7gdq/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: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp3b4z4ntu Check the logs for full command output.
! Push rejected, failed to compile Python app.
! Push failed
I solved this problem changing the version of python. To change the version you have to follow the following steps.
Add a file "runtime.txt".
Edit runtime.txt and add "python-3.7.11" or other python version supported by heroku python versions.
Push your changes to heroku, "git push heroku master"
I solved this problem by using pipreqs instead of pip3 freeze > requirements.txt.
Why not pip freeze?
pip freeze only saves the packages that are installed with pip install in your environment.
pip freeze saves all packages in the environment including those that you don't use in your current project. (if you don't have virtualenv)
and sometimes you just need to create requirements.txt for a new project without installing modules.

Why does pip3 install suddenly not work with a virtual environment

I am working on a python package using a virtual environment on Mac OS version 11.1 . I use the following command to create the virtual environment.
python3 -m venv .venv
Then I use this command to activate the virtual environment;
source .venv/bin/activate
I have used virtual environments in packages many times and have never had a problem. Suddenly with I try a pip install, lets say pip3 install NumPy the install fails with a massive error description. The first few lines state the following;
ERROR: Command errored out with exit status 1:
command: /Users/jonwebb/Desktop/Code_Dev/Python/core_utilities/.venv/bin/python3 /Users/jonwebb/Desktop/Code_Dev/Python/core_utilities/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/rb/11zk766j0jngjmv3qmvcfg7c0000gn/T/tmpc_rc8z1m
cwd: /private/var/folders/rb/11zk766j0jngjmv3qmvcfg7c0000gn/T/pip-install-bx_8yuq0/numpy
Complete output (2154 lines):
Running from numpy source directory.
numpy/random/_bounded_integers.pxd.in has not changed
numpy/random/_philox.pyx has not changed
numpy/random/_bounded_integers.pyx.in has not changed
numpy/random/_sfc64.pyx has not changed
numpy/random/_mt19937.pyx has not changed
numpy/random/bit_generator.pyx has not changed
Processing numpy/random/_bounded_integers.pyx
numpy/random/mtrand.pyx has not changed
numpy/random/_generator.pyx has not changed
numpy/random/_pcg64.pyx has not changed
numpy/random/_common.pyx has not changed
Cythonizing sources
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Users/jonwebb/Desktop/Code_Dev/Python/core_utilities/.venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
blis_info:
libraries blis not found in ['/Users/jonwebb/Desktop/Code_Dev/Python/core_utilities/.venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['/Users/jonwebb/Desktop/Code_Dev/Python/core_utilities/.venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['/Users/jonwebb/Desktop/Code_Dev/Python/core_utilities/.venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['/Users/jonwebb/Desktop/Code_Dev/Python/core_utilities/.venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['/Users/jonwebb/Desktop/Code_Dev/Python/core_utilities/.venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['/Users/jonwebb/Desktop/Code_Dev/Python/core_utilities/.venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
/private/var/folders/rb/11zk766j0jngjmv3qmvcfg7c0000gn/T/pip-install-bx_8yuq0/numpy/numpy/distutils/system_info.py:1989: UserWarning:
The last few lines look like;
########### CLIB COMPILER OPTIMIZATION ###########
Platform :
Architecture: x64
Compiler : clang
CPU baseline :
Requested : 'min'
Enabled : SSE SSE2 SSE3
Flags : -msse -msse2 -msse3
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
Generated : none
CCompilerOpt._cache_write[796] : write cache to path -> /private/var/folders/rb/11zk766j0jngjmv3qmvcfg7c0000gn/T/pip-install-bx_8yuq0/numpy/build/temp.macosx-11-x86_64-3.9/ccompiler_opt_cache_clib.py
----------------------------------------
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
Until recently this was not a problem and I can still conduct pip3 installs outside of a virtual environment. Does anyone know what the cause of this issue is?

Anaconda cython-built module is looking for wrong GLIBCXX

Let me explain the situation.
I compiled a c++ library using system g++ (under linux).
Then built a cython module which calls a function in the pre-compiled library. Building the cython module was done under an anaconada venv (but no g++ installed inside the venv. Hence cython must had used system gcc/g++).
Now under the same anaconda venv, importing the cython module results in an error as:
anaconda3/envs/hspy/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./libc_rd_halo.so).
It seems like the c library (libc_rd_halo.so) which was compiled by system g++ is now looking for an anaconda g++ library. And I don't have g++ installed in anaconda venv.
I can fix the problem by using anaconda g++ to compile the c library from the beginning. Build the cython module again, and then I can import the module.
But I'd like to let anaconda cython use system compiler and look for the system compiler library when the module is being imported.
My questions are:
why does anaconda cython look for a local anaconda g++ by default, but not the system compiler? any benefit doing so?
How can I make anaconda cython look for system compiler library?
why does anaconda cython look for a local anaconda g++ by default, but not the system compiler? any benefit doing so?
How can I make anaconda cython look for system compiler library?
Because libraries compiled with one version of GCC can only be linked with other libraries that were compiled with a compatible version of GCC, as you found out.
You don't. Per above, binaries build with the system compiler may or may not work with other anaconda binaries built using the anaconda compiler.
If you want your binary to use system libraries then you need to make a system package, not an anaconda package. The system package will then only work on that system (and version of).

Unknown Error in numpy module addition to windows python 2.7

This is the error i am getting while running the setup.py Any Ideas what to do about it?? I have tried coping the folder in python directory and all other things possible. The numpy source is downloaded from official directory.
C:\Python27\numpy-1.8.2>python setup.py install
Running from numpy source directory.
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
'test_suite'
warnings.warn(msg)
non-existing path in 'numpy\\distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python
27\\libs']
NOT AVAILABLE
openblas_info:
libraries not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', '
C:\\Python27\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\
Python27\\libs']
NOT AVAILABLE
C:\Python27\numpy-1.8.2\numpy\distutils\system_info.py:1521: 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.
warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
libraries blas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs'
]
NOT AVAILABLE
C:\Python27\numpy-1.8.2\numpy\distutils\system_info.py:1530: 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.
warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
NOT AVAILABLE
C:\Python27\numpy-1.8.2\numpy\distutils\system_info.py:1533: 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.
warnings.warn(BlasSrcNotFoundError.__doc__)
NOT AVAILABLE
non-existing path in 'numpy\\lib': 'benchmarks'
lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python
27\\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
C:\Python27\numpy-1.8.2\numpy\distutils\system_info.py:1427: 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.
warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
libraries lapack not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\lib
s']
NOT AVAILABLE
C:\Python27\numpy-1.8.2\numpy\distutils\system_info.py:1438: 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.
warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
NOT AVAILABLE
C:\Python27\numpy-1.8.2\numpy\distutils\system_info.py:1441: 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.
warnings.warn(LapackSrcNotFoundError.__doc__)
NOT AVAILABLE
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
'define_macros'
warnings.warn(msg)
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler opti
ons
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler opt
ions
running build_src
build_src
building py_modules sources
building library "npymath" sources
No module named msvccompiler in numpy.distutils; trying from distutils
error: Unable to find vcvarsall.bat
C:\Python27\numpy-1.8.2>

Resources