Installing numpy - the system cannot find the file specified (msvcr90.dll) - python

I have been trying to get numpy to install for the last several hours now, and I'm finally giving up and asking for help.
First, I have tried:
I was first getting a "Unable to find vcvarsall.bat" error, so I followed the recommendations from this question (error: Unable to find vcvarsall.bat) and installed Microsoft Visual V++ 2008 Express. This did absolutely nothing.
So then I tried using a different compiler altogether by installing mingw32 and making a disutils.cfg file with:
[build]
compiler = mingw32
And putting it in Python27\Lib\distutils
This got rid of the "Unable to find vcvarsall.bat" error, but now I have the new error about msvcr90.dll.
I have no idea how to fix it, and I'm tired and just want numpy lol. Here is the entire output when I run python setup.py install:
\numpy-1.8.1>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:\Users\Christie\Downloads\numpy-1.8.1\numpy-1.8.1\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:\Users\Christie\Downloads\numpy-1.8.1\numpy-1.8.1\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:\Users\Christie\Downloads\numpy-1.8.1\numpy-1.8.1\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:\Users\Christie\Downloads\numpy-1.8.1\numpy-1.8.1\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:\Users\Christie\Downloads\numpy-1.8.1\numpy-1.8.1\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:\Users\Christie\Downloads\numpy-1.8.1\numpy-1.8.1\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
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Looking for python27.dll
Building msvcr library: "C:\Python27\libs\libmsvcr90.a" (from C:\Windows\winsxs\
amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_99b61f5e8371c1d4\msvc
r90.dll)
error: [Error 2] The system cannot find the file specified

You can install using the binary executable directly rather than from the source. For you 32 bit http://docs.scipy.org/doc/numpy/user/install.html#windows or as you pointed out for the 64 bit version from http://www.lfd.uci.edu/~gohlke/pythonlibs/
[EDIT: Changed based on the comments and added link to 64 bit version]

Related

Error when install h5py on my Windows11, Visual Studio Code, Python 3.10.4, 64-bt

I meet error when install h5py on my Windows11, Visual Studio Code, Python 3.10.4, 64-bt
Please see error detail at the very end of the post
My working process as below (i.e., the way I tired to solve the error):
1st: Upgrade pip, wheel and setuptools: They already satisfied as shown below
PS C:\users\mreal\appdata\local\programs\python\python310\lib\site-packages> pip3 install --upgrade pip
>>
Requirement already satisfied: pip in c:\users\mreal\appdata\local\programs\python\python310\lib\site-packages (22.1.2)
PS C:\users\mreal\appdata\local\programs\python\python310\lib\site-packages> pip install --upgrade wheel
Requirement already satisfied: wheel in c:\users\mreal\appdata\local\programs\python\python310\lib\site-packages (0.37.1)
PS C:\users\mreal\appdata\local\programs\python\python310\lib\site-packages> pip install --upgrade setuptools
Requirement already satisfied: setuptools in c:\users\mreal\appdata\local\programs\python\python310\lib\site-packages (63.2.0)
2nd: Installing virtualenv: Already downloaded
Requirement already satisfied: virtualenv in c:\users\mreal\appdata\roaming\python\python310\site-packages (20.15.1)
Requirement already satisfied: six<2,>=1.9.0 in c:\users\mreal\appdata\local\programs\python\python310\lib\site-packages (from virtualenv) (1.15.0)
Requirement already satisfied: platformdirs<3,>=2 in c:\users\mreal\appdata\roaming\python\python310\site-packages (from virtualenv) (2.5.2)
Requirement already satisfied: filelock<4,>=3.2 in c:\users\mreal\appdata\roaming\python\python310\site-packages (from virtualenv) (3.7.1)
Requirement already satisfied: distlib<1,>=0.3.1 in c:\users\mreal\appdata\roaming\python\python310\site-packages (from virtualenv) (0.3.5)
3rd install C++ build tool: Already download and ready to use as shown below
4th try install package through terminal: Get error
pip install h5py==3.1.0 and pip install --no-binary=h5py h5py==3.1.0
PS C:\users\mreal\appdata\local\programs\python\python310\lib\site-packages> pip install --no-binary=h5py h5py==3.1.0
Collecting h5py==3.1.0
Using cached h5py-3.1.0.tar.gz (371 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> [292 lines of output]
Collecting numpy==1.19.3
Using cached 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
[267 lines of output]
setup.py:67: RuntimeWarning: NumPy 1.19.3 may not yet support Python 3.10.
warnings.warn(
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\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\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
blis_info:
libraries blis not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\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
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\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 ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\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
C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\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 ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
flame_info:
libraries flame not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in C:\Users\mreal\AppData\Local\Programs\Python\Python310\lib
libraries tatlas,tatlas not found in C:\Users\mreal\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\mreal\AppData\Local\Programs\Python\Python310\libs
libraries tatlas,tatlas not found in C:\Users\mreal\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\mreal\AppData\Local\Programs\Python\Python310\lib
libraries satlas,satlas not found in C:\Users\mreal\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\mreal\AppData\Local\Programs\Python\Python310\libs
libraries satlas,satlas not found in C:\Users\mreal\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\mreal\AppData\Local\Programs\Python\Python310\lib
libraries ptf77blas,ptcblas,atlas not found in C:\Users\mreal\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\mreal\AppData\Local\Programs\Python\Python310\libs
libraries ptf77blas,ptcblas,atlas not found in C:\Users\mreal\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\mreal\AppData\Local\Programs\Python\Python310\lib
libraries f77blas,cblas,atlas not found in C:\Users\mreal\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\mreal\AppData\Local\Programs\Python\Python310\libs
libraries f77blas,cblas,atlas not found in C:\Users\mreal\AppData\Local\Programs\Python\Python310\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\mreal\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\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
C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\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_')]
C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\dist.py:275: 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.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
Traceback (most recent call last):
File "C:\Users\mreal\AppData\Local\Temp\tmpc2l1c36b_in_process.py", line 363, in <module>
main()
File "C:\Users\mreal\AppData\Local\Temp\tmpc2l1c36b_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\mreal\AppData\Local\Temp\tmpc2l1c36b_in_process.py", line 164, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\build_meta.py", line 157, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\build_meta.py", line 248, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\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 "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\core.py", line 169, in setup
return old_setup(**new_attr)
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\command\dist_info.py", line 31, in run
egg_info.run()
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\command\egg_info.py", line 24, in run
self.run_command("build_src")
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\command\build_src.py", line 144, in run
self.build_sources()
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\command\build_src.py", line 155, in build_sources
self.build_library_sources(*libname_info)
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\command\build_src.py", line 288, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\command\build_src.py", line 378, in generate_sources
source = func(extension, build_dir)
File "numpy\core\setup.py", line 658, in get_mathlib_info
st = config_cmd.try_link('int main(void) { return 0;}')
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\command\config.py", line 243, in try_link
self._link(body, headers, include_dirs,
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\command\config.py", line 162, in _link
return self._wrap_method(old_config._link, lang,
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\command\config.py", line 96, in _wrap_method
ret = mth(*((self,)+args))
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\command\config.py", line 137, in _link
(src, obj) = self._compile(body, headers, include_dirs, lang)
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\command\config.py", line 105, in _compile
src, obj = self._wrap_method(old_config._compile, lang,
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\command\config.py", line 96, in _wrap_method
ret = mth(*((self,)+args))
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\command\config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 401, in compile
self.spawn(args)
File "C:\Users\mreal\AppData\Local\Temp\pip-build-env-cy6f82db\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 505, in spawn
return super().spawn(cmd, env=env)
File "C:\Users\mreal\AppData\Local\Temp\pip-install-m130oaf9\numpy_f66176bbdc274ad0810a0a91798319ab\numpy\distutils\ccompiler.py", line 90, in <lambda>
m = lambda self, *args, **kw: func(self, *args, **kw)
TypeError: CCompiler_spawn() got an unexpected keyword argument 'env'
[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 backend 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.
h5py version 3.1 requires numpy=1.19.3 which does not have wheels for python 3.10, only up to 3.9 and building numpy from source on Windows is not easy because you would need to take care of quite some dependencies which you would need to build manually before (see e.g. libraries mkl_rt not found in your error message).
I would therefore suggest to either:
downgrade your python version, then install all versions as set in yur question
consider if a newer version of h5py (with a different numpy requirement) would also work for you
Try pip install --no-deps h5py==3.1.0 and install a numpy version compatible with your python separately. This has a high chance of not working, though.
The first option is probably the best, since you most likely have reasons why you need that specific h5py version. If you find yourself often needing different python versions for different projects, consider using a virtual environment manager like conda
A quick way to resolve the issue without troubleshooting.
Please follow the steps and update the same.
Uninstall all the packages you are currently having problems with.
Create a virtual environment: How to create a virtual environment link here
Install all packages inside the virtual environment.
Test by importing them and see if it works.

No BLAS/LAPACK libraries found when installing SciPy

I am using python 3.9.8 and pycharm on a macbook m1.
I have already installed openblas with homebrew but I still get the error below.
I tried installing SciPy via homebrew, but it didn't work properly.
My pip is up to date.
I installed Numpy, Pandas etc. Everything works fine except SciPy and I can't figure out why.
(venv) wes#Air-van-Wes pythonProject % pip install scipy
Collecting scipy
Using cached scipy-1.7.2.tar.gz (36.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: /Users/wes/PycharmProjects/pythonProject/venv/bin/python /Users/wes/PycharmProjects/pythonProject/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/tmpgb5a46oi
cwd: /private/var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/pip-install-19slhbw2/scipy_f4bfaae68a1e4c2db88f86a394b879ca
Complete output (175 lines):
setup.py:491: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/pip-modern-metadata-6yn5g0q3'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Running from SciPy source directory.
Running scipy/linalg/_generate_pyx.py
Running scipy/special/_generate_pyx.py
Running scipy/stats/_generate_pyx.py
Processing scipy/cluster/_vq.pyx
Processing scipy/cluster/_optimal_leaf_ordering.pyx
Processing scipy/cluster/_hierarchy.pyx
Processing scipy/ndimage/src/_cytest.pyx
Processing scipy/ndimage/src/_ni_label.pyx
Processing scipy/linalg/cython_lapack.pyx
Processing scipy/linalg/_matfuncs_sqrtm_triu.pyx
Processing scipy/linalg/_solve_toeplitz.pyx
Processing scipy/linalg/cython_blas.pyx
Processing scipy/linalg/_decomp_update.pyx.in
Processing scipy/optimize/_group_columns.pyx
Processing scipy/optimize/_bglu_dense.pyx
Processing scipy/optimize/_trlib/_trlib.pyx
Processing scipy/optimize/_highs/cython/src/_highs_constants.pyx
Processing scipy/optimize/_highs/cython/src/_highs_wrapper.pyx
Processing scipy/optimize/_lsq/givens_elimination.pyx
Processing scipy/optimize/cython_optimize/_zeros.pyx.in
Processing scipy/io/matlab/mio_utils.pyx
Processing scipy/io/matlab/streams.pyx
Processing scipy/io/matlab/mio5_utils.pyx
Processing scipy/_lib/_ccallback_c.pyx
Processing scipy/_lib/_test_deprecation_def.pyx
Processing scipy/_lib/_test_deprecation_call.pyx
Processing scipy/_lib/messagestream.pyx
Processing scipy/special/_ufuncs_cxx.pyx
Processing scipy/special/cython_special.pyx
Processing scipy/special/_ellip_harm_2.pyx
Processing scipy/special/_comb.pyx
Processing scipy/special/_test_round.pyx
Processing scipy/special/_ufuncs.pyx
Processing scipy/fftpack/convolve.pyx
Processing scipy/interpolate/interpnd.pyx
Processing scipy/interpolate/_bspl.pyx
Processing scipy/interpolate/_ppoly.pyx
Processing scipy/sparse/_csparsetools.pyx.in
Processing scipy/sparse/csgraph/_shortest_path.pyx
Processing scipy/sparse/csgraph/_traversal.pyx
Processing scipy/sparse/csgraph/_flow.pyx
Processing scipy/sparse/csgraph/_tools.pyx
warning: _cython_special_custom.pxi:9:8: Unreachable code
warning: _cython_special_custom.pxi:13:4: Unreachable code
warning: _cython_special_custom.pxi:21:8: Unreachable code
warning: _cython_special_custom.pxi:25:4: Unreachable code
warning: _cython_special_custom.pxi:33:8: Unreachable code
warning: _cython_special_custom.pxi:37:4: Unreachable code
warning: _cython_special_custom.pxi:45:8: Unreachable code
warning: _cython_special_custom.pxi:49:4: Unreachable code
Processing scipy/sparse/csgraph/_matching.pyx
Processing scipy/sparse/csgraph/_reordering.pyx
Processing scipy/sparse/csgraph/_min_spanning_tree.pyx
Processing scipy/spatial/ckdtree.pyx
Processing scipy/spatial/_voronoi.pyx
Processing scipy/spatial/_hausdorff.pyx
Processing scipy/spatial/qhull.pyx
Processing scipy/spatial/transform/rotation.pyx
Processing scipy/signal/_max_len_seq_inner.pyx
Processing scipy/signal/_peak_finding_utils.pyx
Processing scipy/signal/_upfirdn_apply.pyx
Processing scipy/signal/_spectral.pyx
Processing scipy/signal/_sosfilt.pyx
Processing scipy/stats/_stats.pyx
Processing scipy/stats/_qmc_cy.pyx
Processing scipy/stats/_sobol.pyx
Processing scipy/stats/biasedurn.pyx
Processing scipy/stats/_boost/src/beta_ufunc.pyx
Processing scipy/stats/_boost/src/nbinom_ufunc.pyx
Processing scipy/stats/_boost/src/binom_ufunc.pyx
Cythonizing sources
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Users/wes/PycharmProjects/pythonProject/venv/lib', '/usr/lib']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['/Users/wes/PycharmProjects/pythonProject/venv/lib', '/usr/lib']
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['/Users/wes/PycharmProjects/pythonProject/venv/lib', '/usr/lib']
NOT AVAILABLE
flame_info:
libraries flame not found in ['/Users/wes/PycharmProjects/pythonProject/venv/lib', '/usr/lib']
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in /Users/wes/PycharmProjects/pythonProject/venv/lib
libraries tatlas,tatlas not found in /Users/wes/PycharmProjects/pythonProject/venv/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 /Users/wes/PycharmProjects/pythonProject/venv/lib
libraries satlas,satlas not found in /Users/wes/PycharmProjects/pythonProject/venv/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 /Users/wes/PycharmProjects/pythonProject/venv/lib
libraries ptf77blas,ptcblas,atlas not found in /Users/wes/PycharmProjects/pythonProject/venv/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 /Users/wes/PycharmProjects/pythonProject/venv/lib
libraries f77blas,cblas,atlas not found in /Users/wes/PycharmProjects/pythonProject/venv/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 ['/Users/wes/PycharmProjects/pythonProject/venv/lib', '/usr/lib']
NOT AVAILABLE
/private/var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/pip-build-env-4znp06oe/overlay/lib/python3.9/site-packages/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
/private/var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/pip-build-env-4znp06oe/overlay/lib/python3.9/site-packages/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
Traceback (most recent call last):
File "/Users/wes/PycharmProjects/pythonProject/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Users/wes/PycharmProjects/pythonProject/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/wes/PycharmProjects/pythonProject/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/private/var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/pip-build-env-4znp06oe/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel
self.run_setup()
File "/private/var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/pip-build-env-4znp06oe/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 258, in run_setup
super(_BuildMetaLegacyBackend,
File "/private/var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/pip-build-env-4znp06oe/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 631, in <module>
setup_package()
File "setup.py", line 627, in setup_package
setup(**metadata)
File "/private/var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/pip-build-env-4znp06oe/overlay/lib/python3.9/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "setup.py", line 529, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found. Note: Accelerate is no longer supported.
To build Scipy from sources, BLAS & LAPACK libraries need to be installed.
See site.cfg.example in the Scipy source directory and
https://docs.scipy.org/doc/scipy/reference/building/index.html for details.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/0e/23/58c4f995475a2a97cb5f4a032aedaf881ad87cd976a7180c55118d105a1d/scipy-1.7.2.tar.gz#sha256=fa2dbabaaecdb502641b0b3c00dec05fb475ae48655c66da16c9ed24eda1e711 (from https://pypi.org/simple/scipy/) (requires-python:>=3.7,<3.11). Command errored out with exit status 1: /Users/wes/PycharmProjects/pythonProject/venv/bin/python /Users/wes/PycharmProjects/pythonProject/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/bl/2xjy80bj6y57yb5z0frfypk00000gn/T/tmpgb5a46oi Check the logs for full command output.
I encountered the same issue, using Homebrew based Python 3.10 installation and installing Poetry based package depending on Scipy.
The error was:
numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found. Note: Accelerate is no longer supported.
How I fixed this:
# Install lapack and openblas from Homebrew
brew install openblas lapack
# Tell Numpy installer where to find lapack
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"
# See https://github.com/scipy/scipy/issues/12935
export CFLAGS=-Wno-error=implicit-function-declaration
# The location may vary - use find command to find this on your local /usr/local/opt
export LAPACK=/usr/local/opt/lapack/lib/liblapack.dylib
export BLAS=/usr/local/opt/openblas/lib/libopenblasp-r0.3.19.dylib
And then attempting to install the packages again with:
# Install deps
poetry install
poetry / pip / etc. installation methods should be interchangeable.
SciPy 1.6.1 installation will take some time, but this time will complete.
Tip about how LAPACK environment variable works
Some of the official documentation (less useful):
The official Scipy installation instructions.
The official LAPACK installation instructions
Mikko Ohtamaa's method didn't work for me.. I could see why, my brew packages happened to be installed somewhere else and some of the libraries were slightly newer.
It's worth being aware of this. You can see where brew puts stuff easily by just doing this after installing openblas:
brew info openblas
So in the end I had to do:
brew install openblas lapack
export LDFLAGS="-L/opt/homebrew/opt/lapack/lib"
export LDFLAGS="-L/opt/homebrew/opt/lapack/include"
export LDFLAGS="-L/opt/homebrew/opt/lapack/lib"
export CPPFLAGS="-L/opt/homebrew/opt/lapack/include"
export PKG_CONFIG_PATH="-L/opt/homebrew/opt/lapack/pkgconfig"
export CFLAGS=-Wno-error=implicit-function-declaration
export LAPACK=/opt/homebrew/opt/lapack/lib/liblapack.dylib
export BLAS=/opt/homebrew/opt/openblas/lib/libopenblasp-r0.3.20.dylib
poetry install
Still, I'd be nowhere without Mikko's answer. I've tried a couple of other methods that didn't work, so I don't know if that's because I'm on a newer M1 or because brew changed or what..
For Debian/Ubuntu with a virtualenv (poetry):
sudo apt install libatlas-base-dev
sudo apt install gfortran
Then install skipy to your virtual env and wait a very long time for it to build (eg: 10 minutes!)
poetry add scipy scikit-learn
I downloaded conda and now it works just fine.
While OpenBLAS is important to install, it appears that we don't need to point to it in compiler flags. This means that the solution doesn't need to change when a different version of OpenBLAS is present:
brew install openblas lapack
export LDFLAGS="-L/opt/homebrew/opt/lapack/lib"
export CPPFLAGS="-I/opt/homebrew/opt/lapack/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/lapack/lib/pkgconfig"
export LAPACK=/opt/homebrew/opt/lapack/lib/liblapack.dylib
poetry add scipy

Import scipy module to Abaqus 2016 for data analysis using the pre-installed Abaqus Python 2.7.3

I am currently using Abaqus 2016 with the default python 2.7.3. and have read a few different pages/blogs on how to install the scipy module and have been unsuccessful in doing so. From everything I have read, it looks like you simply copy the site-packages over once you get them working. Does anyone have experience in doing this? This might be specific to the scipy module but if there are other modules to import, I'm sure the same procedure could be followed.
I tried downloading Anaconda3 and then Anaconda2 trying to downgrade numpy/scipy and that didn't work either. Here is the link to a previous question I was following.
The current NumPy version installed within Abaqus Python is 1.6.2.
abaqus python
>>> import sys
>>> sys.version
'2.7.3 (default, Feb 7 2015, 16:00:35) [MSC v.1700 64 bit (AMD64)]'
>>> import numpy
>>> numpy.version.version
'1.6.2'
To try a different approach, I downloaded Python 2.7.3 from the Python archives. Defined a new environment variable python2 because I currently have python3 on my computer. After downloading this manually, I haven't been able to import the module numpy. After downloading numpy 1.6.2 and extracting the zip file and copy/pasting the folder inside the python27 site-packages, I opened the command window, changed the directory to the location where the setup.py file is located within numpy. Following the steps outlined here I used the following command python2 setup.py install.
cd C:\Python27\Lib\site-packages\numpy>
Then tried running the following command to set up the module
python2 setup.py install
Here is the error message that I'm unsure how to resolve
C:\Python27\Lib\site-packages\numpy>python2 setup.py install
Running from numpy source directory.Forcing DISTUTILS_USE_SDK=1
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
libraries mkl,vml,guide not found in C:\
libraries mkl,vml,guide not found in C:\Python27\libs
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in C:\Python27\lib
libraries f77blas,cblas,atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python27\libs
NOT AVAILABLE
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1425: 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
libraries blas not found in C:\
libraries blas not found in C:\Python27\libs
NOT AVAILABLE
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1434: 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\Lib\site-packages\numpy\numpy\distutils\system_info.py:1437: 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
lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in C:\Python27\lib
libraries mkl,vml,guide not found in C:\
libraries mkl,vml,guide not found in 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
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1340: 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
libraries lapack not found in C:\
libraries lapack not found in C:\Python27\libs
NOT AVAILABLE
C:\Python27\Lib\site-packages\numpy\numpy\distutils\system_info.py:1351: 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\Lib\site-packages\numpy\numpy\distutils\system_info.py:1354: 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
running install
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
building library "npymath" sources
No module named msvccompiler in numpy.distutils; trying from distutils
error: Unable to find vcvarsall.bat
I'm new to manually importing modules since I mainly use pip install which I guess is not supported by previous versions of python. If there is a better way to do this, please let me know as the goal is to import scipy into Abaqus Python Interface for data analysis.
Thanks!
Unfortunately I can only partially answer your question.
It is indeed possible to do what you want. I am currently using NumPy 1.7.1 and SciPy 0.12.1 with my Abaqus installation. In both cases I simply copied the package folder into the Abaqus site-packages folder. However, this was on Linux rather than Windows, so I can't help with your installation issues for the packages themselves.
One thing to check is that the version of SciPy you want to use is compatible with the version of NumPy you intend to install per this link.

Installing Keras over TensorFlow on Windows 10 (Python 3.5.3)

I'm trying to install Keras on Windows 10 but I get the following error while searching for the installed SciPy:
Installed c:\users\MY_USER\appdata\local\programs\python\python35\lib\site-packages\keras
Processing dependencies for Keras==2.0.4
Searching for scipy>=0.14
Reading https://pypi.python.org/simple/scipy/
Downloading https://pypi.python.org/packages/e5/93/9a8290e7eb5d4f7cb53b9a7ad7b92b9827ecceaddfd04c2a83f195d8767d/scipy-0.19.0.zip#md5=91b8396231eec780222a57703d3ec550
Best match: scipy 0.19.0
Processing scipy-0.19.0.zip
Writing c:\users\MY_USER\appdata\local\temp\easy_install-an2sfx\scipy-0.19.0\setup.cfg
Running scipy-0.19.0\setup.py -q bdist_egg --dist-dir c:\users\MY_USER\appdata\local\temp\easy_install-an2sfx\scipy-0.19.0\egg-dist-tmp-zy7oqf
c:\users\MY_USER\appdata\local\temp\easy_install-an2sfx\scipy-0.19.0\setup.py:323: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command, proceeding with "
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:639: UserWarning: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.11.38-sse2-64\lib is invalid.
warnings.warn('Specified path %s is invalid.' % d)
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:1532: 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:\Python27\lib\site-packages\numpy\distutils\system_info.py:1543: 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:\Python27\lib\site-packages\numpy\distutils\system_info.py:1546: 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__)
Running from scipy source directory.
non-existing path in 'scipy\\integrate': 'quadpack.h'
error: no lapack/blas resources found
Any idea what is wrong?
SciPy installation itself works perfectly.
Did you install any "lapack/blas" library??
If not, you should install it. You could try MKL from Intel. Or you could try just getting "Numpy" and "Scipy" from this link, which come with what is necessary: http://www.lfd.uci.edu/~gohlke/pythonlibs/
But:
Don't install anything in folders containing spaces in their names. User folders without spaces
.
If you already have blas/lapack installed in folders with spaces:
Check numpy configuration:
import numpy as np
np.__config__.show()
It should tell you where lapack/blas is installed.
You should see something like this:
lapack_opt_info:
library_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
blas_opt_info:
library_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
lapack_mkl_info:
library_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
blas_mkl_info:
library_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
Notice in my case I created a folder "LinkToProgramFilesX86". This folder is a symbolic link to the regular "Program Files" folder, which contains spaces. I have to create the symbolic link because of the space.
To create symbolic links, check here: Receive AssertionError while optimizing convolution in theano

Windows + virtualenv + pip + NumPy (problems when installing NumPy)

On Windows, I normally just use the binary installer, but I would like to install NumPy only in a virtualenv this time, so I created a virtual env:
virtualenv --no-site-packages --distribute summary_python
cd summary_python/Scripts
activate.bat
Then I tried to install NumPy
pip install numpy
And I get an error. My pip.log is pasted below:
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:\Users\fname.lname\Documents\summary_python\lib
libraries mkl,vml,guide not found in C:\
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries f77blas,cblas,atlas not found in C:\
NOT AVAILABLE
blas_info:
libraries blas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries blas not found in C:\
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:\Users\fname.lname\Documents\summary_python\lib
libraries mkl,vml,guide not found in C:\
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries lapack_atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries lapack_atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
lapack_info:
libraries lapack not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries lapack not found in C:\
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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:531: UserWarning: Specified path is invalid.
warnings.warn('Specified path %s is invalid.' % d)
c:\Users\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1417: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1426: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1429: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1333: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1344: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1347: 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:\Users\fname.lname\Documents\summary_python\lib
libraries mkl,vml,guide not found in C:\
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries f77blas,cblas,atlas not found in C:\
NOT AVAILABLE
blas_info:
libraries blas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries blas not found in C:\
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:\Users\fname.lname\Documents\summary_python\lib
libraries mkl,vml,guide not found in C:\
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries lapack_atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries lapack_atlas not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
lapack_info:
libraries lapack not found in c:\Users\fname.lname\Documents\summary_python\lib
libraries lapack not found in C:\
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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:531: UserWarning: Specified path is invalid.
warnings.warn('Specified path %s is invalid.' % d)
c:\Users\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1417: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1426: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1429: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1333: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1344: 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\fname.lname\Documents\summary_python\build\numpy\numpy\distutils\system_info.py:1347: 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
----------------------------------------
Command python setup.py egg_info failed with error code 1
Exception information:
Traceback (most recent call last):
File "c:\Users\fname.lname\Documents\summary_python\lib\site-packages\pip-1.0.1-py2.7.egg\pip\basecommand.py", line 126, in main
self.run(options, args)
File "c:\Users\fname.lname\Documents\summary_python\lib\site-packages\pip-1.0.1-py2.7.egg\pip\commands\install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "c:\Users\fname.lname\Documents\summary_python\lib\site-packages\pip-1.0.1-py2.7.egg\pip\req.py", line 986, in prepare_files
req_to_install.run_egg_info()
File "c:\Users\fname.lname\Documents\summary_python\lib\site-packages\pip-1.0.1-py2.7.egg\pip\req.py", line 222, in run_egg_info
command_desc='python setup.py egg_info')
File "c:\Users\fname.lname\Documents\summary_python\lib\site-packages\pip-1.0.1-py2.7.egg\pip\__init__.py", line 255, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command python setup.py egg_info failed with error code 1
I've had success installing NumPy binaries into a virtualenv with good 'ol easy_install and a little bit of un-archiving magic.
The numpy-1.x.x-win32-superpack-python2.x.exe release you download from SourceForge is really just a thin wrapper around three separate binary distributions (with SSE3, SSE2, or no SSE enabled, depending on the capabilities of your CPU). If you open up the superpack EXE file in 7-Zip (or another archive utility), you can extract those individual setup files somewhere to use separately.
Then, activate your virtual environment, and run
easy_install c:\path\to\extracted\numpy-1.x.x-sse3.exe
to install the SSE3-optimized binaries, for example. easy_install is smart enough to find everything it needs inside that wininst bundle and will extract the compiled egg into your virtualenv's site-packages folder. I can also confirm that pip is still able to recognize and/or uninstall NumPy when you do this, and that using pip to install other packages which depend on NumPy works just fine.
The only catch is knowing which optimization level to use (SSE3, SSE2, or no-SSE). If you have a reasonably modern processor (newer than, say, a Pentium 4 or Athlon 64), it's probably safe to go with the full SSE3. You can probably also run the test suite to confirm everything works as expected.
I've found the easy_install "trick" to be really useful for installing all sorts of binary packages into a virtualenv. Even though I have all the requisite compilers set up on my machine, it's usually easier/faster/safer to stick with the official release when one is provided.
Since pip can only install from source, you need to have the setup to build and compile NumPy to be able to use pip. I never tried this.
What I did recently to get NumPy, SciPy and Matplotlib into a virtual environment on Windows 7 is to copy the directories and egg files from my regular Python install directly into the virtual environment. For Matplotlib I also managed to unzip the binary installer directly into the virtualenv (I only tried this for the Gohlke installer for Python 3.2).
I did manage in the past to easy_install NumPy into a virtualenv from a binary distribution, but I didn't manage this time (NumPy 1.5.1).
Someone recommended http://pypi.python.org/pypi/pyg which should allow to install from binary packages to a virtualenv, but I haven't tried it yet.
I didn't have to do the trick of unpacking the .exe file. I just activated my virtual environment, and then:
easy_install numpy

Categories