我想在特定目录下使用pip安装numpy(版本1.16.5)。这是我写的:
pip install --target==C:\Users\DSP\AppData\Local\Programs\Python\Python37 numpy==1.16.5
但是,这是出现的错误:
Collecting numpy==1.16.5
Using cached numpy-1.16.5.zip (5.1 MB)
Using legacy 'setup.py install' for numpy, since package 'wheel' is not installed.
Installing collected packages: numpy
Running setup.py install for numpy ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DSP\\AppData\\Local\\Temp\\pip-install-i8kt_vwq\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\DSP\\AppData\\Local\\Temp\\pip-install-i8kt_vwq\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DSP\AppData\Local\Temp\pip-record-vms64wca\install-record.txt' --single-version-externally-managed --home 'C:\Users\DSP\AppData\Local\Temp\pip-target-kfxgcbge' --compile --install-headers 'C:\Users\DSP\AppData\Local\Temp\pip-target-kfxgcbge\include\python\numpy'
cwd: C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\
Complete output (320 lines):
Running from numpy source directory.
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install numpy` (last NumPy release on PyPi)
C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\misc_util.py:476: SyntaxWarning: "is" with a literal. Did you mean "=="?
return is_string(s) and ('*' in s or '?' is s)
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:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
blis_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries blis not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
openblas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries openblas not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\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
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
atlas_blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\system_info.py:639: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries blas not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\system_info.py:639: 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.
self.calc_info()
blas_src_info:
NOT AVAILABLE
C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\system_info.py:639: 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.
self.calc_info()
NOT AVAILABLE
'svnversion' is not recognized as an internal or external command,
operable program or batch file.
non-existing path in 'numpy\\distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
openblas_lapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries openblas not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
openblas_clapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries openblas,lapack not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in c:\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas,tatlas not found in c:\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas,tatlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in c:\python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas,tatlas not found in c:\python39\libs
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in c:\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas,satlas not found in c:\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas,satlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in c:\python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas,satlas not found in c:\python39\libs
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in c:\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in c:\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in c:\python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in c:\python39\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in c:\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in c:\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in c:\python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in c:\python39\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack not found in ['c:\\python39\\lib', 'C:\\', 'c:\\python39\\libs']
NOT AVAILABLE
C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\system_info.py:639: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
self.calc_info()
lapack_src_info:
NOT AVAILABLE
C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\system_info.py:639: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
self.calc_info()
NOT AVAILABLE
c:\python39\lib\distutils\dist.py:274: 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 options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build\src.win-amd64-3.9
creating build\src.win-amd64-3.9\numpy
creating build\src.win-amd64-3.9\numpy\distutils
building library "npymath" sources
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Ic:\python39\include -Ic:\python39\include /Tc_configtest.c /Fo_configtest.obj
failure.
removing: _configtest.c _configtest.obj
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\setup.py", line 419, in <module>
setup_package()
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\setup.py", line 411, in setup_package
setup(**metadata)
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\core.py", line 171, in setup
return old_setup(**new_attr)
File "c:\python39\lib\site-packages\setuptools\__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "c:\python39\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python39\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\command\install.py", line 62, in run
r = self.setuptools_run()
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\command\install.py", line 36, in setuptools_run
return distutils_install.run(self)
File "c:\python39\lib\distutils\command\install.py", line 546, in run
self.run_command('build')
File "c:\python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\command\build.py", line 47, in run
old_build.run(self)
File "c:\python39\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\command\build_src.py", line 148, in run
self.build_sources()
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\command\build_src.py", line 159, in build_sources
self.build_library_sources(*libname_info)
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\command\build_src.py", line 292, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "C:\Users\DSP\AppData\Local\Temp\pip-install-i8kt_vwq\numpy\numpy\distutils\command\build_src.py", line 375, in generate_sources
source = func(extension, build_dir)
File "numpy\core\setup.py", line 667, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DSP\\AppData\\Local\\Temp\\pip-install-i8kt_vwq\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\DSP\\AppData\\Local\\Temp\\pip-install-i8kt_vwq\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DSP\AppData\Local\Temp\pip-record-vms64wca\install-record.txt' --single-version-externally-managed --home 'C:\Users\DSP\AppData\Local\Temp\pip-target-kfxgcbge' --compile --install-headers 'C:\Users\DSP\AppData\Local\Temp\pip-target-kfxgcbge\include\python\numpy' Check the logs for full command output.
我如何解决这个问题?如何使用pip下载上述版本的numpy? 我使用的pip版本是20.2.3。 当我安装最新版本的numpy时,没有问题。但是,当安装低于1.19的版本时,会出现此eror
目前没有回答
相关问题 更多 >
编程相关推荐