如何在Windows上安装numpy 1.8 dev?

我试图在Windows安装numpy 1.8 dev。 我找不到任何二进制文件,只有1.7.1。 有谁知道在哪里下载?

另外,我也试图自己build立numpy。 我从Github上下载了最新的源代码并运行了python setup.py install ,但是我得到了一个RuntimeError: Broken toolchain: cannot link a simple C program错误RuntimeError: Broken toolchain: cannot link a simple C program 。 这里有一些输出。 我用VS 2008安装了32x和64x编译器以及MinGW 32x。

 C:\numpy-master\numpy\distutils\system_info.py:1429: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. warnings.warn(LapackSrcNotFoundError.__doc__) NOT AVAILABLE running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler opt ons running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler op ions running build_src build_src building py_modules sources building library "npymath" sources 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 Found executable C:\Python27\Scripts\gfortran.exe Found executable C:\Python27\Scripts\gfortran.exe customize Gnu95FCompiler customize Gnu95FCompiler using config C compiler: gcc -O2 -Wall -Wstrict-prototypes compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 -Inu py\core\src\private -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inu py\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\ ore\include -IC:\Python27\include -IC:\Python27\PC -c' gcc -O2 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSI N__=0x0900 -Inumpy\core\src\private -Inumpy\core\src -Inumpy\core -Inumpy\core\ rc\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\ pysort -Inumpy\core\include -IC:\Python27\include -IC:\Python27\PC -c _configte tc -o _configtest.o Found executable C:\Python27\Scripts\gcc.exe g++ _configtest.o -lmsvcr90 -o _configtest.exe Found executable C:\Python27\Scripts\g++.exe c:/python27/egg-info/mingw/usr/bin/../lib/gcc/i686-w64-mingw32/4.5.2/../../../. /i686-w64-mingw32/bin/ld.exe: cannot find -lmsvcr90 collect2: ld returned 1 exit status failure. removing: _configtest.exe.manifest _configtest.c _configtest.o Traceback (most recent call last): File "setup.py", line 216, in <module> setup_package() File "setup.py", line 209, in setup_package configuration=configuration ) File "C:\numpy-master\numpy\distutils\core.py", line 169, in setup return old_setup(**new_attr) File "C:\Python27\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\numpy-master\numpy\distutils\command\build.py", line 39, in run old_build.run(self) File "C:\Python27\lib\distutils\command\build.py", line 127, in run self.run_command(cmd_name) File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command self.distribution.run_command(command) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\numpy-master\numpy\distutils\command\build_src.py", line 153, in run self.build_sources() File "C:\numpy-master\numpy\distutils\command\build_src.py", line 164, in bui d_sources self.build_library_sources(*libname_info) File "C:\numpy-master\numpy\distutils\command\build_src.py", line 299, in bui d_library_sources sources = self.generate_sources(sources, (lib_name, build_info)) File "C:\numpy-master\numpy\distutils\command\build_src.py", line 386, in gen rate_sources source = func(extension, build_dir) File "numpy\core\setup.py", line 646, in get_mathlib_info raise RuntimeError("Broken toolchain: cannot link a simple C program") RuntimeError: Broken toolchain: cannot link a simple C program C:\numpy-master>python setup.py install Running from numpy source directory. non-existing path in 'numpy\\distutils': 'site.cfg' F2PY Version 2 numpy\core\setup_common.py:88: MismatchCAPIWarning: API mismatch detected, the API version numbers have to be updated. Current C api version is 8, with check um f4362353e2d72f889fda0128aa015037, but recorded checksum for C API version 8 n codegen_dir/cversions.txt is 17321775fc884de0b1eda478cd61c74b. If functions w re added in the C API, you have to update C_API_VERSION in numpy\core\setup_co mon.pyc. MismatchCAPIWarning) blas_opt_info: blas_mkl_info: libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Pytho 27\\libs'] NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLAS libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', C:\\Python27\\libs'] NOT AVAILABLE atlas_blas_info: libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\ Python27\\libs'] NOT AVAILABLE C:\numpy-master\numpy\distutils\system_info.py:1501: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) blas_info: libraries blas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs ] NOT AVAILABLE C:\numpy-master\numpy\distutils\system_info.py:1510: UserWarning: Blas (http://www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. warnings.warn(BlasNotFoundError.__doc__) blas_src_info: NOT AVAILABLE C:\numpy-master\numpy\distutils\system_info.py:1513: UserWarning: Blas (http://www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable. warnings.warn(BlasSrcNotFoundError.__doc__) NOT AVAILABLE non-existing path in 'numpy\\lib': 'benchmarks' lapack_opt_info: lapack_mkl_info: mkl_info: libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Pytho 27\\libs'] NOT AVAILABLE NOT AVAILABLE atlas_threads_info: Setting PTATLAS=ATLAS libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib libraries lapack_atlas not found in C:\Python27\lib libraries ptf77blas,ptcblas,atlas not found in C:\ libraries lapack_atlas not found in C:\ libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs libraries lapack_atlas not found in C:\Python27\libs numpy.distutils.system_info.atlas_threads_info NOT AVAILABLE atlas_info: libraries f77blas,cblas,atlas not found in C:\Python27\lib libraries lapack_atlas not found in C:\Python27\lib libraries f77blas,cblas,atlas not found in C:\ libraries lapack_atlas not found in C:\ libraries f77blas,cblas,atlas not found in C:\Python27\libs libraries lapack_atlas not found in C:\Python27\libs numpy.distutils.system_info.atlas_info NOT AVAILABLE C:\numpy-master\numpy\distutils\system_info.py:1415: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) lapack_info: libraries lapack not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\li s'] NOT AVAILABLE C:\numpy-master\numpy\distutils\system_info.py:1426: UserWarning: Lapack (http://www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. warnings.warn(LapackNotFoundError.__doc__) lapack_src_info: NOT AVAILABLE C:\numpy-master\numpy\distutils\system_info.py:1429: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. warnings.warn(LapackSrcNotFoundError.__doc__) NOT AVAILABLE running install running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler opt ons running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler op ions running build_src build_src building py_modules sources building library "npymath" sources 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 Found executable C:\Python27\Scripts\gfortran.exe Found executable C:\Python27\Scripts\gfortran.exe customize Gnu95FCompiler customize Gnu95FCompiler using config C compiler: gcc -O2 -Wall -Wstrict-prototypes compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 -Inu py\core\src\private -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inu py\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\ ore\include -IC:\Python27\include -IC:\Python27\PC -c' gcc -O2 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSI N__=0x0900 -Inumpy\core\src\private -Inumpy\core\src -Inumpy\core -Inumpy\core\ rc\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\ pysort -Inumpy\core\include -IC:\Python27\include -IC:\Python27\PC -c _configte tc -o _configtest.o Found executable C:\Python27\Scripts\gcc.exe g++ _configtest.o -lmsvcr90 -o _configtest.exe Found executable C:\Python27\Scripts\g++.exe c:/python27/egg-info/mingw/usr/bin/../lib/gcc/i686-w64-mingw32/4.5.2/../../../. /i686-w64-mingw32/bin/ld.exe: cannot find -lmsvcr90 collect2: ld returned 1 exit status failure. removing: _configtest.exe.manifest _configtest.c _configtest.o Traceback (most recent call last): File "setup.py", line 216, in <module> setup_package() File "setup.py", line 209, in setup_package configuration=configuration ) File "C:\numpy-master\numpy\distutils\core.py", line 169, in setup return old_setup(**new_attr) File "C:\Python27\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\numpy-master\numpy\distutils\command\install.py", line 57, in run r = old_install.run(self) File "C:\Python27\lib\distutils\command\install.py", line 563, in run self.run_command('build') File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command self.distribution.run_command(command) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\numpy-master\numpy\distutils\command\build.py", line 39, in run old_build.run(self) File "C:\Python27\lib\distutils\command\build.py", line 127, in run self.run_command(cmd_name) File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command self.distribution.run_command(command) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\numpy-master\numpy\distutils\command\build_src.py", line 153, in run self.build_sources() File "C:\numpy-master\numpy\distutils\command\build_src.py", line 164, in bui d_sources self.build_library_sources(*libname_info) File "C:\numpy-master\numpy\distutils\command\build_src.py", line 299, in bui d_library_sources sources = self.generate_sources(sources, (lib_name, build_info)) File "C:\numpy-master\numpy\distutils\command\build_src.py", line 386, in gen rate_sources source = func(extension, build_dir) File "numpy\core\setup.py", line 646, in get_mathlib_info raise RuntimeError("Broken toolchain: cannot link a simple C program") RuntimeError: Broken toolchain: cannot link a simple C program 

Solutions Collecting From Web of "如何在Windows上安装numpy 1.8 dev?"

我解决了它。

首先确保你安装了Visual Studio 2008,可能还有MinGW。 然后你需要安装http://software.intel.com/en-us/intel-mkl,然后需要在你的numpy / distutils /目录下创建一个site.cfg文件。 添加到它

 [mkl] include_dirs = C:\Program Files (x86)\Intel\Composer XE 2013\mkl\include library_dirs = C:\Program Files (x86)\Intel\Composer XE 2013\mkl\lib\ia32 mkl_libs = mkl_ia32, mkl_c_dll, libguide40 lapack_libs = mkl_lapack 

然后去你的python安装到C:\ Python27 \ Lib \ distutils \ distutils.cfg确保它是空的! 并没有这样的事情

 [build] compiler=mingw32 

这将甩掉你的安装程序。 您可以将C:\ MinGW \ bin添加到Path中,但不确定是否需要这样做。 最后,回到你的numpy源代码目录并运行python setup.py install 。 应该编译没有错误。