Running setup.py install for numpy ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"
'C:\Users\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\setup.py'"'"'; file='"'"'C:\Users\DELL
\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(fi
le) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n
'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\DELL\AppData\Local\Temp\pip-record-lmajv6wh\install-reco
rd.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dell\appdata\local\programs\python\python39\Include\numpy'
cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d
Complete output (273 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\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\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:\users\dell\appdata\local\programs\python\python39\lib', 'C:\', 'c:\users\dell\appdata\local\
programs\python\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\pr
ograms\python\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local
\programs\python\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\
programs\python\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\
programs\python\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\
\appdata\local\programs\python\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\app
data\local\programs\python\python39\libs']
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
C:\Users\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\pr
ograms\python\python39\libs']
NOT AVAILABLE
C:\Users\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\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\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\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' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\
programs\python\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local
\programs\python\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\appdata
\local\programs\python\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:\users\dell\appdata\local\programs\python\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas,tatlas not found in c:\users\dell\appdata\local\programs\python\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:\users\dell\appdata\local\programs\python\python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas,tatlas not found in c:\users\dell\appdata\local\programs\python\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:\users\dell\appdata\local\programs\python\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas,satlas not found in c:\users\dell\appdata\local\programs\python\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:\users\dell\appdata\local\programs\python\python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas,satlas not found in c:\users\dell\appdata\local\programs\python\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:\users\dell\appdata\local\programs\python\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in c:\users\dell\appdata\local\programs\python\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:\users\dell\appdata\local\programs\python\python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in c:\users\dell\appdata\local\programs\python\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:\users\dell\appdata\local\programs\python\python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in c:\users\dell\appdata\local\programs\python\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:\users\dell\appdata\local\programs\python\python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in c:\users\dell\appdata\local\programs\python\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:\\users\\dell\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\dell\\appdata\\local\\
programs\python\python39\libs']
NOT AVAILABLE
C:\Users\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\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\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\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:\users\dell\appdata\local\programs\python\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
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/
----------------------------------------
Rolling back uninstall of numpy
Moving to c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\numpy-1.21.2.dist-info
from C:\Users\DELL\AppData\Local\Programs\Python\Python39\Lib\site-packages~umpy-1.21.2.dist-info
Moving to c:\users\dell\appdata\local\programs\python\python39\lib\site-packages\numpy
from C:\Users\DELL\AppData\Local\Programs\Python\Python39\Lib\site-packages~umpy
Moving to c:\users\dell\appdata\local\programs\python\python39\scripts\f2py.exe
from C:\Users\DELL\AppData\Local\Temp\pip-uninstall-6hu1440m\f2py.exe
ERROR: Command errored out with exit status 1: 'c:\users\dell\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setupto
ols, tokenize; sys.argv[0] = '"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\setup.py'"'"
'; file='"'"'C:\Users\DELL\AppData\Local\Temp\pip-install-chrh_0yg\numpy_6eef7e64a07b4d69aa691c7921cf292d\setup.py'"'"';f = getattr(tok
enize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read(
).replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\DELL\AppData\Local\Temp
\pip-record-lmajv6wh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dell\appdata\local\programs\pyth
on\python39\Include\numpy' Check the logs for full command output
打开cmd窗口,输入pip install xxx试试
安装cnocr需要numpy库为依赖,在安装依赖时由于缺少相关组件,没有编译成功而失败。解决思路,到
https://www.lfd.uci.edu/~gohlke/pythonlibs
下载numpy+mkl对应版本(64位系统下载win-amd64版本,python3.9下载cp39),在本地安装运行,如果系统内缺少c++编译工具到错误信息提示里的网址下载安装。安装成功后再运行cnocr安装。
如对你有帮助,请点击我回答的右上方采纳按钮给予采纳。
楼主找到解决办法了嘛?我也遇到一样的问题!