pandas 安装 Numpy 时出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28096243/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 22:52:11  来源:igfitidea点击:

Error while Installing Numpy

pythonnumpypandas

提问by Rajat Nigam

When install pandas, it requires numpy to be installed and on installing it gives following error:

安装 pandas 时,需要安装 numpy,安装时出现以下错误:

Processing numpy-1.9.1.zip
Writing c:\cygwin64\tmp\easy_install-4x5clr\numpy-1.9.1\setup.cfg
Running numpy-1.9.1\setup.py -q bdist_egg --dist-dir c:\cygwin64\tmp\easy_install-4x5clr\numpy-1.9.1\egg-dist-tmp-rz7g3x
non-existing path in 'numpy\distutils': 'site.cfg'
non-existing path in 'numpy\f2py': 'docs'
non-existing path in 'numpy\f2py': 'f2py.1'
non-existing path in 'numpy\lib': 'benchmarks'
Running from numpy source directory.
c:\cygwin64\tmp\easy_install-4x5clr\numpy-1.9.1\numpy\distutils\system_info.py:1526: UserWarning:
    Atlas 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:\cygwin64\tmp\easy_install-4x5clr\numpy-1.9.1\numpy\distutils\system_info.py:1535: UserWarning:
    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:\cygwin64\tmp\easy_install-4x5clr\numpy-1.9.1\numpy\distutils\system_info.py:1538: UserWarning:
    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:\cygwin64\tmp\easy_install-4x5clr\numpy-1.9.1\numpy\distutils\system_info.py:1432: UserWarning:
    Atlas 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:\cygwin64\tmp\easy_install-4x5clr\numpy-1.9.1\numpy\distutils\system_info.py:1443: 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:\cygwin64\tmp\easy_install-4x5clr\numpy-1.9.1\numpy\distutils\system_info.py:1446: UserWarning:
    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__)
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
error: Setup script exited with error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27

How can i resolve this error?

我该如何解决这个错误?

I installed Visual C++ but when i installed numpy using easy_install numpy i got following error:

我安装了 Visual C++,但是当我使用 easy_install numpy 安装 numpy 时,出现以下错误:

I installed Visual C++ and then tried easy_install numpy but i got following error:

我安装了 Visual C++,然后尝试了 easy_install numpy,但出现以下错误:

Writing c:\cygwin64\tmp\easy_install-jh4ada\numpy-1.9.1\setup.cfg
Running numpy-1.9.1\setup.py -q bdist_egg --dist-dir c:\cygwin64\tmp\easy_instal                                                                                                                l-jh4ada\numpy-1.9.1\egg-dist-tmp-shcroi
non-existing path in 'numpy\distutils': 'site.cfg'
non-existing path in 'numpy\f2py': 'docs'
non-existing path in 'numpy\f2py': 'f2py.1'
non-existing path in 'numpy\lib': 'benchmarks'
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Running from numpy source directory.
c:\cygwin64\tmp\easy_install-jh4ada\numpy-1.9.1\numpy\distutils\system_info.py:1                                                                                                                526: 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:\cygwin64\tmp\easy_install-jh4ada\numpy-1.9.1\numpy\distutils\system_info.py:1                                                                                                                535: 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:\cygwin64\tmp\easy_install-jh4ada\numpy-1.9.1\numpy\distutils\system_info.py:1                                                                                                                538: 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:\cygwin64\tmp\easy_install-jh4ada\numpy-1.9.1\numpy\distutils\system_info.py:1                                                                                                                432: 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:\cygwin64\tmp\easy_install-jh4ada\numpy-1.9.1\numpy\distutils\system_info.py:1                                                                                                                443: 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:\cygwin64\tmp\easy_install-jh4ada\numpy-1.9.1\numpy\distutils\system_info.py:1                                                                                                                446: 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__)
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:                                                                                                                 'define_macros'
  warnings.warn(msg)
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
don't know how to compile Fortran code on platform 'nt'
_configtest.c
_configtest.c(1) : fatal error C1083: Cannot open include file: 'endian.h': No s                                                                                                                uch file or directory
_configtest.c
_configtest.c(5) : error C2118: negative subscript
_configtest.c
_configtest.c(5) : error C2118: negative subscript
_configtest.c
_configtest.c(5) : error C2118: negative subscript

_configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol rint referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol trunc referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol exp2 referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol log2 _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol builtin_expect referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.c _configtest.c(1) : error C2143: syntax error : missing ')' before '(' _configtest.c(1) : error C2143: syntax error : missing ')' before '(' _configtest.c(1) : error C2091: function returns function _configtest.c(1) : error C2143: syntax error : missing ')' before 'string' _configtest.c(1) : error C2091: function returns function _configtest.c(1) : error C2143: syntax error : missing '{' before 'string' _configtest.c(1) : error C2059: syntax error : '' _configtest.c(1) : error C2059: syntax error : ')' _configtest.c(1) : error C2059: syntax error : ')' _configtest.c(1) : error C2059: syntax error : ')' _configtest.c(3) : warning C4163: 'attribute_optimize_unroll_loops' : not available as an intrinsic function _configtest.c(6) : error C2065: 'attribute_optimize_unroll_loops' : undeclared identifier _configtest.c _configtest.c(1) : error C2143: syntax error : missing ')' before '(' _configtest.c(1) : error C2143: syntax error : missing ')' before '(' _configtest.c(1) : error C2091: function returns function _configtest.c(1) : error C2143: syntax error : missing ')' before 'string' _configtest.c(1) : error C2091: function returns function _configtest.c(1) : error C2143: syntax error : missing '{' before 'string' _configtest.c(1) : error C2059: syntax error : '' _configtest.c(1) : error C2059: syntax error : ')' _configtest.c(1) : error C2059: syntax error : ')' _configtest.c(1) : error C2059: syntax error : ')' _configtest.c(3) : warning C4163: 'attribute_optimize_opt_3' : not available as an intrinsic function _configtest.c(6) : error C2065: 'attribute_optimize_opt_3' : undeclared identifier _configtest.c _configtest.c(1) : error C2143: syntax error : missing ')' before '(' _configtest.c(1) : error C2143: syntax error : missing ')' before '(' _configtest.c(1) : error C2091: function returns function _configtest.c(1) : error C2143: syntax error : missing ')' before 'constant' _configtest.c(1) : error C2091: function returns function _configtest.c(1) : error C2143: syntax error : missing '{' before 'constant' _configtest.c(1) : error C2059: syntax error : '' _configtest.c(1) : error C2059: syntax error : ')' _configtest.c(1) : error C2059: syntax error : ')' _configtest.c(1) : error C2059: syntax error : ')' _configtest.c(3) : warning C4163: 'attribute_nonnull' : not available as an intrinsic function _configtest.c(6) : error C2065: 'attribute_nonnull' : undeclared identifier _configtest.c _configtest.c(1) : error C2061: syntax error : identifier 'a' _configtest.c(1) : error C2059: syntax error : ';' _configtest.c(3) : warning C4163: '__thread' : not available as an intrinsic function _configtest.c(6) : error C2065: '__thread' : undeclared identifier _configtest.obj : error LNK2019: unresolved external symbol nextafterf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol copysignf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol log2f referenced in function main _configtest.obj : error LNK2019: unresolved external symbol exp2f referenced in function main _configtest.obj : error LNK2019: unresolved external symbol ldexpf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol frexpf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol hypotf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol atanhf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol acoshf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol asinhf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol expm1f referenced in function main _configtest.obj : error LNK2019: unresolved external symbol log1pf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol truncf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol rintf referenced in function main _configtest.obj : error LNK2019: unresolved external symbol fabsf referenced in function main _configtest.exe : fatal error LNK1120: 15 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol fabsf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol rintf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol truncf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol log1pf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol expm1f referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol asinhf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol acoshf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol atanhf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol hypotf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol frexpf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol ldexpf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol exp2f referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol log2f referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol copysignf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol nextafterf referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol nextafterl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol copysignl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol log2l referenced in function main _configtest.obj : error LNK2019: unresolved external symbol exp2l referenced in function main _configtest.obj : error LNK2019: unresolved external symbol ldexpl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol frexpl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol modfl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol fmodl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol powl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol atan2l referenced in function main _configtest.obj : error LNK2019: unresolved external symbol hypotl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol atanhl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol acoshl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol asinhl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol atanl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol acosl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol asinl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol expm1l referenced in function main _configtest.obj : error LNK2019: unresolved external symbol expl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol log1pl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol logl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol log10l referenced in function main _configtest.obj : error LNK2019: unresolved external symbol sqrtl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol truncl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol rintl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol ceill referenced in function main _configtest.obj : error LNK2019: unresolved external symbol floorl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol fabsl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol tanhl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol coshl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol sinhl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol tanl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol cosl referenced in function main _configtest.obj : error LNK2019: unresolved external symbol sinl referenced in function main _configtest.exe : fatal error LNK1120: 34 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol sinl referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol cosl referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol tanl referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol sinhl referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol coshl referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol tanhl referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol fabsl referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol floorl referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol ceill referenced in function main _configtest.exe : fatal error LNK1120: 1 unresolved externals _configtest.obj : error LNK2019: unresolved external symbol rintl referenced in function main _configtest.c _configtest.c(8) : error C2065: 'HAVE_DECL_SIGNBIT' : undeclared identifier _configtest.c _configtest.c(8) : error C2065: 'HAVE_DECL_ISFINITE' : undeclared identifier _configtest.c _configtest.c(8) : error C2065: 'signbit' : undeclared identifier _configtest.c _configtest.c(8) : error C2065: 'isfinite' : undeclared identifier _configtest.c _configtest.c(1) : fatal error C1083: Cannot open include file: 'complex.h': No such file or directory BUILD_ARCHITECTURE: 'AMD64', os.name='nt', sys.platform='win32' _configtest.c _configtest.c(3) : error C2054: expected '(' to follow 'inline' _configtest.c(4) : error C2085: 'static_func' : not in formal parameter list _configtest.c(4) : error C2143: syntax error : missing ';' before '{' _configtest.c(7) : error C2054: expected '(' to follow 'inline' _configtest.c(8) : error C2085: 'nostatic_func' : not in formal parameter list _configtest.c(8) : error C2143: syntax error : missing ';' before '{' _configtest.c _configtest.c(3) : error C2054: expected '(' to follow '__inline' _configtest.c(4) : error C2085: 'static_func' : not in formal parameter list _configtest.c(4) : error C2143: syntax error : missing ';' before '{' _configtest.c(7) : error C2054: expected '(' to follow 'inline' _configtest.c(8) : error C2085: 'nostatic_func' : not in formal parameter list _configtest.c(8) : error C2143: syntax error : missing ';' before '{' _configtest.c _configtest.c(7) : error C2065: 'Py_UNICODE_WIDE' : undeclared identifier File: build\src.win-amd64-2.7\numpy\core\include/numpy\config.h #define SIZEOF_PY_INTPTR_T 8 #define SIZEOF_OFF_T 4 #define SIZEOF_PY_LONG_LONG 8 #define MATHLIB #define HAVE_SIN 1 #define HAVE_COS 1 #define HAVE_TAN 1 #define HAVE_SINH 1 #define HAVE_COSH 1 #define HAVE_TANH 1 #define HAVE_FABS 1 #define HAVE_FLOOR 1 #define HAVE_CEIL 1 #define HAVE_SQRT 1 #define HAVE_LOG10 1 #define HAVE_LOG 1 #define HAVE_EXP 1 #define HAVE_ASIN 1 #define HAVE_ACOS 1 #define HAVE_ATAN 1 #define HAVE_FMOD 1 #define HAVE_MODF 1 #define HAVE_FREXP 1 #define HAVE_LDEXP 1 #define HAVE_ATAN2 1 #define HAVE_POW 1 #define HAVE_XMMINTRIN_H 1 #define HAVE_EMMINTRIN_H 1 #define HAVE__MM_LOAD_PS 1 #define HAVE__MM_LOAD_PD 1 #define HAVE___DECLSPEC_THREAD_ 1 #define HAVE_SINF 1 #define HAVE_COSF 1 #define HAVE_TANF 1 #define HAVE_SINHF 1 #define HAVE_COSHF 1 #define HAVE_TANHF 1 #define HAVE_FLOORF 1 #define HAVE_CEILF 1 #define HAVE_SQRTF 1 #define HAVE_LOG10F 1 #define HAVE_LOGF 1 #define HAVE_EXPF 1 #define HAVE_ASINF 1 #define HAVE_ACOSF 1 #define HAVE_ATANF 1 #define HAVE_ATAN2F 1 #define HAVE_POWF 1 #define HAVE_FMODF 1 #define HAVE_MODFF 1 #define __NPY_PRIVATE_NO_SIGNAL #define DISTUTILS_USE_SDK #define FORCE_NO_LONG_DOUBLE_FORMATTING #define ENABLE_SEPARATE_COMPILATION 1 #define HAVE_LDOUBLE_IEEE_DOUBLE_LE 1 #ifndef __cplusplus #define inline __inline #endif

_configtest.exe:致命错误 LNK1120:1 个未解析的外部 _configtest.obj:错误 LNK2019:在函数 main _configtest.exe 中引用了未解析的外部符号 rint:致命错误 LNK1120:1 个未解析的外部 _configtest.obj:错误 LNK2019:引用外部符号 LNK2019:未解析函数 main _configtest.exe:致命错误 LNK1120:1 个未解析的外部 _configtest.obj:错误 LNK2019:函数 main _configtest.exe 中引用的未解析外部符号 exp2:致命错误 LNK1120:1 个未解析外部 _configtest.obj:错误 LNK2solved 外部符号日志_configtest.exe:致命错误 LNK1120:1 个未解析的外部 _configtest.obj:错误 LNK2019:未解析的外部符号常量'_configtest.c(1):错误C2059:语法错误:''_configtest.c(1):错误C2059:语法错误:')'_configtest.c(1):错误C2059:语法错误:')'_configtest .c(1):错误 C2059:语法错误:')' _configtest.c(3):警告 C4163:'attribute_nonnull':不可作为内在函数 _configtest.c(6):错误 C2065:'attribute_nonnull':未声明标识符 _configtest.c _configtest.c(1):错误 C2061:语法错误:标识符 'a' _configtest.c(1):错误 C2059:语法错误:';' _configtest.c(3):警告 C4163:'__thread':不能作为内部函数使用 _configtest.c(6):错误 C2065:'__thread':未声明的标识符 _configtest.obj:错误 LNK2019:'_configtest.c(4):错误 C2085:'static_func':不在形式参数列表中 _configtest.c(4):错误 C2143:语法错误:缺少 ';' 在 '{' _configtest.c(7) 之前:错误 C2054:预期 '(' to follow ' inline'_configtest.c(8):错误 C2085:'nostatic_func':不在形式参数列表中 _configtest.c(8):错误 C2143:语法错误:缺少 ';' 在 '{' _configtest.c _configtest.c(7) 之前:错误 C2065:'Py_UNICODE_WIDE':未声明的标识符文件:build\src.win-amd64-2.7\numpy\core\include/numpy\config。

#ifndef _NPY_NPY_CONFIG_H_
#error config.h should never be included directly, include npy_config.h instead
#endif

EOF
_configtest.c
_configtest.c(1) : fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory
_configtest.c
_configtest.c(6) : fatal error C1189: #error :  gcc >= 4 required
File: build\src.win-amd64-2.7\numpy\core\include/numpy\_numpyconfig.h
#define NPY_SIZEOF_SHORT SIZEOF_SHORT
#define NPY_SIZEOF_INT SIZEOF_INT
#define NPY_SIZEOF_LONG SIZEOF_LONG
#define NPY_SIZEOF_FLOAT 4
#define NPY_SIZEOF_COMPLEX_FLOAT 8
#define NPY_SIZEOF_DOUBLE 8
#define NPY_SIZEOF_COMPLEX_DOUBLE 16
#define NPY_SIZEOF_LONGDOUBLE 8
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
#define NPY_SIZEOF_PY_INTPTR_T 8
#define NPY_SIZEOF_OFF_T 4
#define NPY_SIZEOF_PY_LONG_LONG 8
#define NPY_SIZEOF_LONGLONG 8
#define NPY_NO_SIGNAL 1
#define NPY_NO_SMP 0
#define NPY_HAVE_DECL_ISNAN
#define NPY_HAVE_DECL_ISINF
#define NPY_ENABLE_SEPARATE_COMPILATION 1
#define NPY_VISIBILITY_HIDDEN
#define NPY_ABI_VERSION 0x01000009
#define NPY_API_VERSION 0x00000009

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS 1
#endif

EOF
### Warning:  Using unoptimized lapack ###
### Warning:  Using unoptimized lapack ###
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution

回答by brettmichaelgreen

EDIT 3: BEST WAY see if you have pip, if not, it is easy to install open up cmd.exe type

编辑3:最好的方法看看你是否有pip,如果没有,很容易安装打开cmd.exe类型

python -m pip install numpy

Try using this installer for numpy from the repository http://www.lfd.uci.edu/~gohlke/pythonlibs/

尝试使用此安装程序从存储库 http://www.lfd.uci.edu/~gohlke/pythonlibs/

http://www.lfd.uci.edu/~gohlke/pythonlibs/girnt9fk/numpy-MKL-1.9.1.win32-py2.7.exe

http://www.lfd.uci.edu/~gohlke/pythonlibs/girnt9fk/numpy-MKL-1.9.1.win32-py2.7.exe

and see if you return errors there

看看你是否在那里返回错误

EDIT: There are two major errors here

编辑:这里有两个主要错误

  1. is a problem with the setup.py (or at least easy-install)

    either the script is the problem (can't find files in the directory)

    or the directory downloaded was flawed

    Atlas, Blas, Blassrc, and Lapack sources cannot be found because the

  1. 是 setup.py(或至少易于安装)的问题

    要么是脚本有问题(在目录中找不到文件)

    或者下载的目录有问题

    无法找到 Atlas、Blas、Blassrc 和 Lapack 源,因为

script never found numpy\distutils\site.cfg that would point to these. To fix

脚本从未找到指向这些的 numpy\distutils\site.cfg。修理

this problem Rajat would have to edit the script setup.py and fix the

这个问题 Rajat 必须编辑脚本 setup.py 并修复

directory location for site.cfg

site.cfg 的目录位置

  1. Rajat may not have the right version of Microsoft Visual C++(2008), he can check
  1. Rajat 可能没有正确版本的 Microsoft Visual C++(2008),他可以检查

it using a variety of methods, but it wouldn't hurt to download

它使用多种方法,但下载不会有什么坏处

separately, Rajat can get it from here http://www.microsoft.com/en-us/download/details.aspx?id=29

单独,Rajat 可以从这里获得它 http://www.microsoft.com/en-us/download/details.aspx?id=29

ALTERNATIVELY, it is likely the exe will work out of box, as someone who

或者,exe 很可能会开箱即用,因为有人

sometimes uses Windows to write python, .exes and .msis are the first thing

有时用windows写python,.exes和.msis是第一件事

I look for, because they have always given the least headaches for me if

我寻找,因为他们总是给我最少的头痛,如果

they exist

他们存在

EDIT 2:

编辑2:

I downloaded numpy 1.9.1.zip, in the instructions it says you have to build YOUR OWN site.cfg file. there is more information in a file called site.cfg.example (you can open it with a text editor like Notepad ++, Gedit, &c). From what I understand the the only contents need to be

我下载了 numpy 1.9.1.zip,在说明中它说您必须构建自己的 site.cfg 文件。在名为 site.cfg.example 的文件中有更多信息(您可以使用 Notepad ++、Gedit 等文本编辑器打开它)。据我所知,唯一需要的内容是

    library_dirs=c:\mingw\lib,c:\atlas\lib

for this to work, you need to download the mingw package, you can get that from here:

为此,您需要下载 mingw 包,您可以从这里获取:

http://sourceforge.net/projects/mingw/files/

http://sourceforge.net/projects/mingw/files/

and you need Atlas, the instructions to install that are here

你需要 Atlas,安装说明在这里

http://math-atlas.sourceforge.net/atlas_install/node50.html

http://math-atlas.sourceforge.net/atlas_install/node50.html

make sure these folders go to C:\ or change the directory in site.cfg

确保这些文件夹转到 C:\ 或更改 site.cfg 中的目录

the site.cfg you write in a text editor needs to be in PATHTONUMPY-1.9.1/numpy/distutils/

您在文本编辑器中编写的 site.cfg 需要位于 PATHTONUMPY-1.9.1/numpy/distutils/

I HIGHLY recommend trying the .exe I've linked. but try these and update if there are more errors

我强烈建议尝试我链接的 .exe。但如果有更多错误,请尝试这些并更新

回答by John

In these cases I recommend using a Python distribution from other vendors who take care of providing complex packages built for Windows. Seriously, have a look at for instance https://www.activestate.com/activepython/downloads. It's free to use without limitations (as long as you do not sell it), it comes with a good installer and it comes with a package manager, where you can just type pypm install numpyand pypm install pandas.

在这些情况下,我建议使用来自其他供应商的 Python 发行版,这些供应商负责提供为 Windows 构建的复杂包。说真的,看看例如https://www.activestate.com/activepython/downloads。它可以无限制地免费使用(只要您不出售它),它带有一个很好的安装程序,它带有一个包管理器,您只需在其中键入pypm install numpypypm install pandas.

The main advantage of this method is that it is super fast to re-create your Python environment of choice on any given Windows machine.

这种方法的主要优点是在任何给定的 Windows 机器上重新创建您选择的 Python 环境的速度非常快。

There is no disadvantage with such a Python installation, you can still use pip and all other package installation methods you are used to.

这样的 Python 安装没有任何缺点,您仍然可以使用 pip 和您习惯的所有其他包安装方法。

回答by user3303554

Installing pandas via the Anaconda package is the easiest way I've found:http://continuum.io/downloadsThis installer includes all the dependencies in one streamlined, contained install. I highly recommend it.

通过 Anaconda 包安装 pandas 是我发现的最简单的方法:http: //continuum.io/downloads该安装程序将所有依赖项包含在一个简化的包含安装中。我强烈推荐它。