目录

  • Python版本
  • 报错信息
    • pip 安装numpy报错
    • pip 安装 scipy报错
    • pip 安装 pywin32 报错
  • 解决办法
    • 网络方法1
    • 网络方法2
    • 请测解决方法

Python版本

$ python
Python 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

报错信息

pip 安装numpy报错

$ pip install numpy
Looking in indexes:
Collecting numpyUsing cached /numpy-1.22.4.zipInstalling build dependencies ... doneGetting requirements to build wheel ... donePreparing wheel metadata ... done
Building wheels for collected packages: numpyBuilding wheel for numpy (PEP 517) ... errorComplete output from command Processing numpy/random\_bounded_integers.pxd.inProcessing numpy/random\bit_generator.pyxProcessing numpy/random\mtrand.pyxProcessing numpy/random\_bounded_integers.pyx.inProcessing numpy/random\_common.pyxProcessing numpy/random\_generator.pyxProcessing numpy/random\_mt19937.pyxProcessing numpy/random\_pcg64.pyxProcessing numpy/random\_philox.pyxProcessing numpy/random\_sfc64.pyxCythonizing sourcesINFO: blas_opt_info:INFO: blas_armpl_info:INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilsINFO: customize MSVCCompilerINFO:   libraries armpl_lp64_mp not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: blas_mkl_info:INFO:   libraries mkl_rt not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: blis_info:INFO:   libraries blis not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: openblas_info:INFO:   libraries openblas not found in ['\\lib', 'C:\\']INFO: get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'INFO: customize GnuFCompilerWARN: Could not locate executable g77WARN: Could not locate executable f77INFO: customize IntelVisualFCompilerWARN: Could not locate executable ifortWARN: Could not locate executable iflINFO: customize AbsoftFCompilerWARN: Could not locate executable f90INFO: customize CompaqVisualFCompilerINFO: Found executable C:\Program Files\Git\usr\bin\DF.exeWARN: Could not locate executable C:\ProgramINFO: customize IntelItaniumVisualFCompilerWARN: Could not locate executable eflINFO: customize Gnu95FCompilerWARN: Could not locate executable gfortranWARN: Could not locate executable f95INFO: customize G95FCompilerWARN: Could not locate executable g95INFO: customize IntelEM64VisualFCompilerINFO: customize IntelEM64TFCompilerWARN: Could not locate executable efortWARN: Could not locate executable efcINFO: customize PGroupFlangCompilerWARN: Could not locate executable flangWARN: don't know how to compile Fortran code on platform 'nt'INFO:   NOT AVAILABLEINFO:INFO: accelerate_info:INFO:   NOT AVAILABLEINFO:INFO: atlas_3_10_blas_threads_info:INFO: Setting PTATLAS=ATLASINFO:   libraries tatlas not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: atlas_3_10_blas_info:INFO:   libraries satlas not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: atlas_blas_threads_info:INFO: Setting PTATLAS=ATLASINFO:   libraries ptf77blas,ptcblas,atlas not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: atlas_blas_info:INFO:   libraries f77blas,cblas,atlas not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: blas_info:INFO:   libraries blas not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: blas_src_info:INFO:   NOT AVAILABLEINFO:INFO:   NOT AVAILABLEINFO:non-existing path in 'numpy\\distutils': 'site.cfg'INFO: lapack_opt_info:INFO: lapack_armpl_info:INFO:   libraries armpl_lp64_mp not found in ['\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: lapack_mkl_info:INFO:   libraries mkl_rt not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: openblas_lapack_info:INFO:   libraries openblas not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: openblas_clapack_info:INFO:   libraries openblas,lapack not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: flame_info:INFO:   libraries flame not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: atlas_3_10_threads_info:INFO: Setting PTATLAS=ATLASINFO:   libraries tatlas,tatlas not found in \libINFO:   libraries tatlas,tatlas not found in C:\INFO: <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>INFO:   NOT AVAILABLEINFO:INFO: atlas_3_10_info:INFO:   libraries satlas,satlas not found in \libINFO:   libraries satlas,satlas not found in C:\INFO: <class 'numpy.distutils.system_info.atlas_3_10_info'>INFO:   NOT AVAILABLEINFO:INFO: atlas_threads_info:INFO: Setting PTATLAS=ATLASINFO:   libraries ptf77blas,ptcblas,atlas not found in \libINFO:   libraries ptf77blas,ptcblas,atlas not found in C:\INFO: <class 'numpy.distutils.system_info.atlas_threads_info'>INFO:   NOT AVAILABLEINFO:INFO: atlas_info:INFO:   libraries f77blas,cblas,atlas not found in \libINFO:   libraries f77blas,cblas,atlas not found in C:\INFO: <class 'numpy.distutils.system_info.atlas_info'>INFO:   NOT AVAILABLEINFO:INFO: lapack_info:INFO:   libraries lapack not found in ['\\lib', 'C:\\']INFO:   NOT AVAILABLEINFO:INFO: lapack_src_info:INFO:   NOT AVAILABLEINFO:INFO:   NOT AVAILABLEINFO:INFO: numpy_linalg_lapack_lite:INFO:   FOUND:INFO:     language = cINFO:     define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]INFO:running bdist_wheelrunning buildrunning config_ccINFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler optionsrunning config_fcINFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler optionsrunning build_srcINFO: build_srcINFO: building py_modules sourcescreating buildcreating build\src.win-amd64-3.8creating build\src.win-amd64-3.8\numpycreating build\src.win-amd64-3.8\numpy\distutilsINFO: building library "npymath" sourcesRunning from numpy source directory.\pip-install-trxrwr8e\numpy\numpy\distutils\system_info.py:2077: 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 switchingBlas library.if self._calc_info(blas):\pip-install-trxrwr8e\numpy\numpy\distutils\system_info.py:2077: UserWarning:Blas (http://www.netlib.org/blas/) libraries not found.Directories to search for the libraries can be specified in thenumpy/distutils/site.cfg file (section [blas]) or by settingthe BLAS environment variable.if self._calc_info(blas):pip-install-trxrwr8e\numpy\numpy\distutils\system_info.py:2077: UserWarning:Blas (http://www.netlib.org/blas/) sources not found.Directories to search for the sources can be specified in thenumpy/distutils/site.cfg file (section [blas_src]) or by settingthe BLAS_SRC environment variable.if self._calc_info(blas):
pip-install-trxrwr8e\numpy\numpy\distutils\system_info.py:1902: UserWarning:Lapack (http://www.netlib.org/lapack/) libraries not found.Directories to search for the libraries can be specified in thenumpy/distutils/site.cfg file (section [lapack]) or by settingthe LAPACK environment variable.return getattr(self, '_calc_info_{}'.format(name))()\numpy\numpy\distutils\system_info.py:1902: UserWarning:Lapack (http://www.netlib.org/lapack/) sources not found.Directories to search for the sources can be specified in thenumpy/distutils/site.cfg file (section [lapack_src]) or by settingthe LAPACK_SRC environment variable.return getattr(self, '_calc_info_{}'.format(name))()Warning: attempted relative import with no known parent package\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'warnings.warn(msg)error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/----------------------------------------Failed building wheel for numpyRunning setup.py clean for numpyComplete output from command \Scripts\python.exe -u -c "import setuptools, tokenize;__file__='\\pip-install-  trxrwr8e\\numpy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec')
)" clean --all:Running from numpy source directory.`setup.py clean` is not supported, use one of the following instead:- `git clean -xdf` (cleans all files)- `git clean -Xdf` (cleans all versioned files, doesn't touchfiles that aren't checked into the git repo)Add `--force` to your command to use it anyway if you must (unsupported).----------------------------------------Failed cleaning build dir for numpy
Failed to build numpy
Could not build wheels for numpy which use PEP 517 and cannot be installed directly

从报错内容看疑似编译环境问题
https://wiki.python.org/moin/WindowsCompilers

pip 安装 scipy报错

$ pip install scipy
Looking in indexes:
Collecting scipyUsing cached /scipy-1.8.1.tar.gzInstalling build dependencies ... errorComplete output from command \Scripts\python.exe \lib\site-packages\pip-19
.0.3-py3.8.egg\pip install --ignore-installed --no-user --prefix
\pip-build-env-iogzj8v9\overlay --no-warn-script-location --no-binary :none: -
-only-binary :none:  --trusted-host  -- wheel<0.38.0 setuptools<60.0.0 Cython>=0.29.18,<3.0 pybind
11>=2.4.3,<2.9.0 pythran>=0.10.0,<0.11.0 "numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64' and platform_python_implementation != 'PyPy'" "numpy==1.20.0; p
ython_version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin'" "numpy==1.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Da
rwin'" "numpy==1.17.5; python_version=='3.8' and platform_machine=='s390x' and platform_python_implementation != 'PyPy'" "numpy==1.17.3; python_version=='3.8' and (platform_m
achine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64' and platform_machine!='s390x' and platform_python_implementation != 'PyPy'" "numpy==1.19.3; pyth
on_version=='3.9' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_python_implementation != 'PyPy'" "numpy==1.21.4; python_version=='3.10' and platfo
rm_python_implementation != 'PyPy'" "numpy; python_version>='3.11'" "numpy; python_version>='3.8' and platform_python_implementation=='PyPy'":Ignoring numpy: markers 'python_version == "3.8" and platform_machine == "aarch64" and platform_python_implementation != "PyPy"' don't match your environmentIgnoring numpy: markers 'python_version == "3.8" and platform_machine == "arm64" and platform_system == "Darwin"' don't match your environmentIgnoring numpy: markers 'python_version == "3.9" and platform_machine == "arm64" and platform_system == "Darwin"' don't match your environmentIgnoring numpy: markers 'python_version == "3.8" and platform_machine == "s390x" and platform_python_implementation != "PyPy"' don't match your environmentIgnoring numpy: markers 'python_version == "3.9" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_python_implementation != "PyPy"' don't match
your environmentIgnoring numpy: markers 'python_version == "3.10" and platform_python_implementation != "PyPy"' don't match your environmentIgnoring numpy: markers 'python_version >= "3.11"' don't match your environmentIgnoring numpy: markers 'python_version >= "3.8" and platform_python_implementation == "PyPy"' don't match your environmentLooking in indexes: Collecting wheel<0.38.0Using cached /wheel-0.37.1-py2.py3-none-any.whlCollecting setuptools<60.0.0Using cached /setuptools-59.8.0-py3-none-any.whlCollecting Cython<3.0,>=0.29.18Using cached /Cython-0.29.30-py2.py3-none-any.whlCollecting pybind11<2.9.0,>=2.4.3Using cached /pybind11-2.8.1-py2.py3-none-any.whlCollecting pythran<0.11.0,>=0.10.0Using cached /pythran-0.10.0-py3-none-any.whlCollecting numpy==1.17.3Using cached /numpy-1.17.3.zipCollecting ply>=3.4 (from pythran<0.11.0,>=0.10.0)Using cached /ply-3.11-py2.py3-none-any.whlCollecting gast~=0.5.0 (from pythran<0.11.0,>=0.10.0)Using cached /gast-0.5.3-py3-none-any.whlCollecting beniget~=0.4.0 (from pythran<0.11.0,>=0.10.0)Using cached /beniget-0.4.1-py3-none-any.whlBuilding wheels for collected packages: numpyBuilding wheel for numpy (setup.py): startedBuilding wheel for numpy (setup.py): finished with status 'error'Complete output from command \Scripts\python.exe -u -c "import setuptools, tokenize;__file__='\\pip-install-szyxpo9w\\numpy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec
'))" bdist_wheel -d C:\pip-wheel-czsqh5ng --python-tag cp38:Running from numpy source directory.blas_opt_info:blas_mkl_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries mkl_rt not found in ['\\lib', 'C:\\']NOT AVAILABLEblis_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries blis not found in ['\\lib', 'C:\\']NOT AVAILABLEopenblas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries openblas not found in ['\\lib', 'C:\\']get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'customize GnuFCompilerCould not locate executable g77Could not locate executable f77customize IntelVisualFCompilerCould not locate executable ifortCould not locate executable iflcustomize AbsoftFCompilerCould not locate executable f90customize CompaqVisualFCompilerFound executable C:\Program Files\Git\usr\bin\DF.exeCould not locate executable C:\Programcustomize IntelItaniumVisualFCompilerCould not locate executable eflcustomize Gnu95FCompilerCould not locate executable gfortranCould not locate executable f95customize G95FCompilerCould not locate executable g95customize IntelEM64VisualFCompilercustomize IntelEM64TFCompilerCould not locate executable efortCould not locate executable efccustomize PGroupFlangCompilerCould not locate executable flangdon't know how to compile Fortran code on platform 'nt'NOT AVAILABLEatlas_3_10_blas_threads_info:Setting PTATLAS=ATLASNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries tatlas not found in ['\\lib', 'C:\\']NOT AVAILABLEatlas_3_10_blas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries satlas not found in ['\\lib', 'C:\\']NOT AVAILABLEatlas_blas_threads_info:Setting PTATLAS=ATLASNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries ptf77blas,ptcblas,atlas not found in ['\\lib', 'C:\\']NOT AVAILABLEatlas_blas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries f77blas,cblas,atlas not found in ['\\lib', 'C:\\']NOT AVAILABLEaccelerate_info:NOT AVAILABLE\pip-install-szyxpo9w\numpy\numpy\distutils\system_info.py:690: 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 switchingBlas library.self.calc_info()blas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries blas not found in ['\\lib', 'C:\\']NOT AVAILABLE\pip-install-szyxpo9w\numpy\numpy\distutils\system_info.py:690: UserWarning:Blas (http://www.netlib.org/blas/) libraries not found.Directories to search for the libraries can be specified in thenumpy/distutils/site.cfg file (section [blas]) or by settingthe BLAS environment variable.self.calc_info()blas_src_info:NOT AVAILABLE\pip-install-szyxpo9w\numpy\numpy\distutils\system_info.py:690: UserWarning:Blas (http://www.netlib.org/blas/) sources not found.Directories to search for the sources can be specified in thenumpy/distutils/site.cfg file (section [blas_src]) or by settingthe BLAS_SRC environment variable.self.calc_info()NOT AVAILABLE'svnversion' 不是内部或外部命令,也不是可运行的程序或批处理文件。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 distutilscustomize MSVCCompilerlibraries mkl_rt not found in ['\\lib', 'C:\\']NOT AVAILABLEopenblas_lapack_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries openblas not found in ['\\lib', 'C:\\']NOT AVAILABLEopenblas_clapack_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries openblas,lapack not found in ['\\lib', 'C:\\']NOT AVAILABLEflame_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries flame not found in ['\\lib', 'C:\\']NOT AVAILABLEatlas_3_10_threads_info:Setting PTATLAS=ATLASNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries tatlas,tatlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in C:\No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries tatlas,tatlas not found in C:\<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>NOT AVAILABLEatlas_3_10_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries satlas,satlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in C:\No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries satlas,satlas not found in C:\<class 'numpy.distutils.system_info.atlas_3_10_info'>NOT AVAILABLEatlas_threads_info:Setting PTATLAS=ATLASNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries ptf77blas,ptcblas,atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in C:\No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries ptf77blas,ptcblas,atlas not found in C:\<class 'numpy.distutils.system_info.atlas_threads_info'>NOT AVAILABLEatlas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries f77blas,cblas,atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in C:\No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries f77blas,cblas,atlas not found in C:\<class 'numpy.distutils.system_info.atlas_info'>NOT AVAILABLElapack_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack not found in ['\\lib', 'C:\\']NOT AVAILABLE\pip-install-szyxpo9w\numpy\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 thenumpy/distutils/site.cfg file (section [lapack]) or by settingthe LAPACK environment variable.if getattr(self, '_calc_info_{}'.format(lapack))():lapack_src_info:NOT AVAILABLE\pip-install-szyxpo9w\numpy\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 thenumpy/distutils/site.cfg file (section [lapack_src]) or by settingthe LAPACK_SRC environment variable.if getattr(self, '_calc_info_{}'.format(lapack))():NOT AVAILABLE\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'warnings.warn(msg)running bdist_wheelrunning buildrunning config_ccunifing config_cc, config, build_clib, build_ext, build commands --compiler optionsrunning config_fcunifing config_fc, config, build_clib, build_ext, build commands --fcompiler optionsrunning build_srcbuild_srcbuilding py_modules sourcescreating buildcreating build\src.win-amd64-3.8creating build\src.win-amd64-3.8\numpycreating build\src.win-amd64-3.8\numpy\distutilsbuilding library "npymath" sourcesNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilserror: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/----------------------------------------Failed building wheel for numpyRunning setup.py clean for numpyComplete output from command \Scripts\python.exe -u -c "import setuptools, tokenize;__file__='\\pip-install-szyxpo9w\\numpy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec
'))" clean --all:Running from numpy source directory.`setup.py clean` is not supported, use one of the following instead:- `git clean -xdf` (cleans all files)- `git clean -Xdf` (cleans all versioned files, doesn't touchfiles that aren't checked into the git repo)Add `--force` to your command to use it anyway if you must (unsupported).----------------------------------------Failed cleaning build dir for numpyFailed to build numpyInstalling collected packages: wheel, setuptools, Cython, pybind11, ply, gast, numpy, beniget, pythranRunning setup.py install for numpy: startedRunning setup.py install for numpy: finished with status 'error'Complete output from command \Scripts\python.exe -u -c "import setuptools, tokenize;__file__='\\pip-install-szyxpo9w\\numpy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'ex
ec'))" install --record \pip-record-_j9_fs2m\install-record.txt --single-version-externally-managed --prefix \pi
p-build-env-iogzj8v9\overlay --compile --install-headers include\site\python3.8\numpy:Running from numpy source directory.Note: if you need reliable uninstall behavior, then installwith pip instead of using `setup.py install`:- `pip install .`       (from a git repo or downloaded sourcerelease)- `pip install numpy`   (last NumPy release on PyPi)blas_opt_info:blas_mkl_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries mkl_rt not found in ['\\lib', 'C:\\']NOT AVAILABLEblis_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries blis not found in ['\\lib', 'C:\\']NOT AVAILABLEopenblas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries openblas not found in ['\\lib', 'C:\\']get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'customize GnuFCompilerCould not locate executable g77Could not locate executable f77customize IntelVisualFCompilerCould not locate executable ifortCould not locate executable iflcustomize AbsoftFCompilerCould not locate executable f90customize CompaqVisualFCompilerFound executable C:\Program Files\Git\usr\bin\DF.exeCould not locate executable C:\Programcustomize IntelItaniumVisualFCompilerCould not locate executable eflcustomize Gnu95FCompilerCould not locate executable gfortranCould not locate executable f95customize G95FCompilerCould not locate executable g95customize IntelEM64VisualFCompilercustomize IntelEM64TFCompilerCould not locate executable efortCould not locate executable efccustomize PGroupFlangCompilerCould not locate executable flangdon't know how to compile Fortran code on platform 'nt'NOT AVAILABLEatlas_3_10_blas_threads_info:Setting PTATLAS=ATLASNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries tatlas not found in ['\\lib', 'C:\\']NOT AVAILABLEatlas_3_10_blas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries satlas not found in ['\\lib', 'C:\\']NOT AVAILABLEatlas_blas_threads_info:Setting PTATLAS=ATLASNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries ptf77blas,ptcblas,atlas not found in ['\\lib', 'C:\\']NOT AVAILABLEatlas_blas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries f77blas,cblas,atlas not found in ['\\lib', 'C:\\']NOT AVAILABLEaccelerate_info:NOT AVAILABLE\pip-install-szyxpo9w\numpy\numpy\distutils\system_info.py:690: 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 switchingBlas library.self.calc_info()blas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries blas not found in ['\\lib', 'C:\\']NOT AVAILABLE\pip-install-szyxpo9w\numpy\numpy\distutils\system_info.py:690: UserWarning:Blas (http://www.netlib.org/blas/) libraries not found.Directories to search for the libraries can be specified in thenumpy/distutils/site.cfg file (section [blas]) or by settingthe BLAS environment variable.self.calc_info()blas_src_info:NOT AVAILABLE\pip-install-szyxpo9w\numpy\numpy\distutils\system_info.py:690: UserWarning:Blas (http://www.netlib.org/blas/) sources not found.Directories to search for the sources can be specified in thenumpy/distutils/site.cfg file (section [blas_src]) or by settingthe BLAS_SRC environment variable.self.calc_info()NOT AVAILABLE'svnversion' 不是内部或外部命令,也不是可运行的程序或批处理文件。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 distutilscustomize MSVCCompilerlibraries mkl_rt not found in ['\\lib', 'C:\\']NOT AVAILABLEopenblas_lapack_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries openblas not found in ['\\lib', 'C:\\']NOT AVAILABLEopenblas_clapack_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries openblas,lapack not found in ['\\lib', 'C:\\']NOT AVAILABLEflame_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries flame not found in ['\\lib', 'C:\\']NOT AVAILABLEatlas_3_10_threads_info:Setting PTATLAS=ATLASNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries tatlas,tatlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in C:\No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries tatlas,tatlas not found in C:\<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>NOT AVAILABLEatlas_3_10_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries satlas,satlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in C:\No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries satlas,satlas not found in C:\<class 'numpy.distutils.system_info.atlas_3_10_info'>NOT AVAILABLEatlas_threads_info:Setting PTATLAS=ATLASNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries ptf77blas,ptcblas,atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in C:\No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries ptf77blas,ptcblas,atlas not found in C:\<class 'numpy.distutils.system_info.atlas_threads_info'>NOT AVAILABLEatlas_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries f77blas,cblas,atlas not found in \libNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack_atlas not found in C:\No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries f77blas,cblas,atlas not found in C:\<class 'numpy.distutils.system_info.atlas_info'>NOT AVAILABLElapack_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompilerlibraries lapack not found in ['\\lib', 'C:\\']NOT AVAILABLE\pip-install-szyxpo9w\numpy\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 thenumpy/distutils/site.cfg file (section [lapack]) or by settingthe LAPACK environment variable.if getattr(self, '_calc_info_{}'.format(lapack))():lapack_src_info:NOT AVAILABLE\pip-install-szyxpo9w\numpy\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 thenumpy/distutils/site.cfg file (section [lapack_src]) or by settingthe LAPACK_SRC environment variable.if getattr(self, '_calc_info_{}'.format(lapack))():NOT AVAILABLE\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'warnings.warn(msg)running installrunning buildrunning config_ccunifing config_cc, config, build_clib, build_ext, build commands --compiler optionsrunning config_fcunifing config_fc, config, build_clib, build_ext, build commands --fcompiler optionsrunning build_srcbuild_srcbuilding py_modules sourcesbuilding library "npymath" sourcesNo module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilserror: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/----------------------------------------
Command "\Scripts\python.exe \lib\site-packages\pip-19.0.3-py3.8.egg\pip ins
tall --ignore-installed --no-user --prefix \pip-build-env-iogzj8v9\overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i--trusted-host  -- wheel<0.38.0 setuptools<60.0.0 Cython>=0.29.18,<3.0 pybind11>=2.4.3,<2.9.0 pythr
an>=0.10.0,<0.11.0 "numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64' and platform_python_implementation != 'PyPy'" "numpy==1.20.0; python_version=='3.8' a
nd platform_machine=='arm64' and platform_system=='Darwin'" "numpy==1.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin'" "numpy==1.17.5;python_version=='3.8' and platform_machine=='s390x' and platform_python_implementation != 'PyPy'" "numpy==1.17.3; python_version=='3.8' and (platform_machine!='arm64' orCommand "\Scripts\python.exe \lib\site-packages\pip-19.0.3-py3.8.egg\pipinstall --ignore-installed --no-user --prefix \pip-bu
ild-env-iogzj8v9\overlay --no-warn-script-location --no-binary :none: --only-binary :
none:
inghua.edu.cn -- wheel<0.38.0 setuptools<60.0.0 Cython>=0.29.18,<3.0 pybind11>=2.4.3,
<2.9.0 pythran>=0.10.0,<0.11.0 "numpy==1.19.2; python_version=='3.8' and platform_mac
hine=='aarch64' and platform_python_implementation != 'PyPy'" "numpy==1.20.0; python_
version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin'" "numpy==1
.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darw
in'" "numpy==1.17.5; python_version=='3.8' and platform_machine=='s390x' and platform_python_implementation != 'PyPy'" "numpy==1.17.3; python_version=='3.8' and (platform_mac
hine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64' and platform_machine!='s390x' and platform_python_implementation != 'PyPy'" "numpy==1.19.3; python
_version=='3.9' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_python_implementation != 'PyPy'" "numpy==1.21.4; python_version=='3.10' and platin'" "numpy==1.17.5; python_version=='3.8' and platform_machine=='s390x' and platform
_python_implementation != 'PyPy'" "numpy==1.17.3; python_version=='3.8' and (platform
_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64' and p
latform_machine!='s390x' and platform_python_implementation != 'PyPy'" "numpy==1.19.3
; python_version=='3.9' and (platform_machine!='arm64' or platform_system!='Darwin')
and platform_python_implementation != 'PyPy'" "numpy==1.21.4; python_version=='3.10' and platform_python_implementation != 'PyPy'" "numpy; python_version>='3.11'" "numpy; pyt
hon_version>='3.8' and platform_python_implementation=='PyPy'"" failed with error code 1 in None

pip 安装 pywin32 报错

$ pip install pywin32
Looking in indexes:
Collecting pywin32Could not find a version that satisfies the requirement pywin32 (from versions: )
No matching distribution found for pywin32

解决办法

网络方法1


$ pip install numpy+mkl-cp38-none-win_amd64.whl
Requirement 'numpy+mkl-cp38-none-win_amd64.whl' looks like a filename, but the file does not exist
numpy+mkl-cp38-none-win_amd64.whl is not a valid wheel filename.

请测不适用,无效

网络方法2

根据 https://visualstudio.microsoft.com/visual-cpp-build-tools/
安装微软 Visual Studio 重新搭建C++编译环境

$ pip install numpy-1.18.5+mkl-cp38-none-win_amd64.whl
Requirement 'numpy-1.18.5+mkl-cp38-none-win_amd64.whl' looks like a filename, but the file does not exist
Looking in indexes:
Processing \numpy-1.18.5+mkl-cp38-none-win_amd64.whl
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '\\numpy-1.18.5+mkl-cp38-non
e-win_amd64.whl'

过程繁琐未测试

请测解决方法

将pip版本退回较低版本,不使用最新的版本

$ python -m pip install pip==20.2.4
Looking in indexes:
Collecting pip==20.2.4Downloading /pip-20.2.4-py2.py3-none-any.whl (1.5 MB)---------------------------------------- 1.5/1.5 MB 2.2 MB/s eta 0:00:00
Installing collected packages: pipAttempting uninstall: pipFound existing installation: pip 22.1.2Uninstalling pip-22.1.2:Successfully uninstalled pip-22.1.2
Successfully installed pip-20.2.4$

再次安装,成功

$ pip install numpy
Looking in indexes:
Collecting numpyDownloading /numpy-1.22.4-cp38-cp38-win_amd64.whl (14.8 MB)|████████████████████████████████| 14.8 MB 1.3 MB/s
Installing collected packages: numpy
Successfully installed numpy-1.22.4
WARNING: You are using pip version 20.2.4; however, version 22.1.2 is available.
You should consider upgrading via the '\Scripts\python.exe -m pip install --upgrade pip' command.

《Python笔记》安装(pip)第三方包报错相关推荐

  1. 记录版本更新安装时解析包报错

    记录版本更新安装时解析包报错 2020-07-09 17:05:52.785 24157-24213/? W/OPInstallStaging: Error staging apk from cont ...

  2. pip下载包报错ERROR: Could not find a version that satisfies the requirement xxxx==1.0.2 (from versions

    我在安装pymysql的时候报错 ERROR: Could not find a version that satisfies the requirement pymysql==1.0.2 (from ...

  3. 解决AttributeError: 'module' object has no attribute 'main' 安装第三方包报错

    1.找到pycharm 目录下的 \helper\packaging_tool.py 文件 2.用新版pycharm 的packaging_tool.py 替换 旧版 同名文件 文件代码如下: imp ...

  4. JAVA第三方包导入但找不到类,解决:导入第三方包报错java.lang.NoClassDefFoundError:XXX.XXX,XXXXXX...

    报错信息如下,主要是导入androidpn测试client端,结果报错 04-02 16:28:34.325: E/dalvikvm(485): Could not find class 'org.a ...

  5. virtualBox安装centos6增强包报错解决及配置共享文件夹

     一.安装增强包 1.启动CentOS6.5 虚拟机,点击设备à 安装增强功能. 则 "光盘"VBOXADDITIONS已经挂载到 CentOS 5.5 的桌面上了. 此时 双 ...

  6. 【运行报错】Openstack 在部署 Keystone 时出现依赖包报错 (解决所有安装时依赖包报错问题)

    1. 报错信息: 在安装 openstack keystone 时出现问题: 错误:软件包:python2-qpid-proton-0.22.0-1.el7.x86_64 (centos-openst ...

  7. 安装vue第三方插件报错Could not find a declaration file for module ‘vue-photo-preview‘.

    问题:在我进行安装vue的第三方插件的时候遇到了这样的一个问题,报了这样的错误 Could not find a declaration file for module 'vue-photo-prev ...

  8. 安装pip模块python-pip报错

    命令:yum install -y python-pip 错误一:提示No package python-pip available.Error: Nothing to do 解决: a.yum -y ...

  9. Python安装pip时, 报错:zipimport.ZipImportError: can‘t decompress data; zlib not available 解决办法:

    centos python3.6版本升级到3.9,完成后 rm -fr /usr/bin/python3.6  rm -fr /usr/bin/python3.6m  rm -fr /usr/bin/ ...

最新文章

  1. redis的set()方法参数
  2. 在RedHat上安装gcc,java 和 eclipse-rcp
  3. 安装Kali Linux操作系统Kali Linux无线网络渗透
  4. 4g模块注册上网 移远_Openwrt支持移远4G模块过程记录
  5. p7zip的解压和压缩
  6. python代替javascript_Pyjamas - 用python代替javascript编写基于浏览器的应用
  7. css——常用选择器
  8. Python实现:某个用户登录后,查看自己拥有所有权限
  9. iOS连续上传多张图片
  10. react网页适配不同分辨率_PC端页面适应不同的分辨率的方法 (转载)
  11. spring 中常用注解
  12. 通过模板生成Excel表格——XLSTransformer
  13. linux能不能上网页,详解能上QQ不能打开网页的问题
  14. 怎么查看Java的源代码
  15. 计算机网络原理(谢希仁第八版)第一章课后习题答案
  16. ubuntu 使用xdotool 用键盘代替鼠标左键
  17. 51单片机流水灯方法大全
  18. Python 数组高级索引
  19. 超有趣的Python实战:将图片转成像素风~
  20. java里的椭圆拟合_[求助]椭圆的跟踪拟合

热门文章

  1. 《第一行代码》中遇到的问题
  2. 移远通信新一代LTE智能模组SC200E系列,以强大性能赋能多场景转型
  3. 基于SSM的校园疫情防控系统的设计与实现
  4. 如何异步下载图片显示进度条
  5. FFmpeg在iOS开发中编译并使用
  6. css三角形 增涨,CSS3实现三角形不断放大效果
  7. 为什么说施工是最蛋疼的工程行业
  8. 32b汇编——数组分配和访问
  9. 持续集成(CI)工具-----jenkins
  10. mysql查询集合查询之数据库除法、关系代数除法(优化嵌套查询)