我将 Python 3.6b3 用于一个在 Windows 上开发的长期运行项目。 对于这个项目,我还需要 NumPy。 我试过 Python36 -m pip install numpy,但似乎 pip 还没有进入测试版。 为 Python 3.6b3 安装 NumPy 的最佳方法是什么?
[编辑:使用 ensurepip 后添加了安装日志]
D:\aaa\numpy-1.12.0b1>call C:\Python36\python.exe -m pip install numpy
Collecting numpy
Using cached numpy-1.11.2.tar.gz
Installing collected packages: numpy
Running setup.py install for numpy: started
Running setup.py install for numpy: finished with status 'error'
Complete output from command C:\Python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\info_000\\AppData\\Local\\Temp\\pip-build-ueljt0po\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\info_000\AppData\Local\Temp\pip-nmezr3c7-record\install-record.txt --single-version-externally-managed --compile:
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)
blas_opt_info:
blas_mkl_info:
libraries mkl_rt not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\system_info.py:1630: 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:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\system_info.py:1639: 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:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\system_info.py:1642: 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\\distutils': 'site.cfg'
F2PY Version 2
lapack_opt_info:
openblas_lapack_info:
libraries openblas not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
lapack_mkl_info:
libraries mkl_rt not found in ['C:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas,tatlas not found in C:\Python36\lib
libraries lapack_atlas not found in C:\Python36\lib
libraries tatlas,tatlas not found in C:\
libraries lapack_atlas not found in C:\
libraries tatlas,tatlas not found in C:\Python36\libs
libraries lapack_atlas not found in C:\Python36\libs
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
libraries satlas,satlas not found in C:\Python36\lib
libraries lapack_atlas not found in C:\Python36\lib
libraries satlas,satlas not found in C:\
libraries lapack_atlas not found in C:\
libraries satlas,satlas not found in C:\Python36\libs
libraries lapack_atlas not found in C:\Python36\libs
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python36\lib
libraries lapack_atlas not found in C:\Python36\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python36\libs
libraries lapack_atlas not found in C:\Python36\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:\Python36\lib
libraries lapack_atlas not found in C:\Python36\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python36\libs
libraries lapack_atlas not found in C:\Python36\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\system_info.py:1532: 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:\\Python36\\lib', 'C:\\', 'C:\\Python36\\libs']
NOT AVAILABLE
C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\system_info.py:1543: 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:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\system_info.py:1546: 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
C:\Python36\lib\distutils\dist.py:261: 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.6
creating build\src.win-amd64-3.6\numpy
creating build\src.win-amd64-3.6\numpy\distutils
building library "npymath" sources
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
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
don't know how to compile Fortran code on platform 'nt'
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Inumpy\core\src\private -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -IC:\Python36\include -IC:\Python36\include /Tc_configtest.c /Fo_configtest.obj
Could not locate executable cl.exe
Executable cl.exe does not exist
failure.
removing: _configtest.c _configtest.obj
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\setup.py", line 386, in <module>
setup_package()
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\setup.py", line 378, in setup_package
setup(**metadata)
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\core.py", line 169, in setup
return old_setup(**new_attr)
File "C:\Python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\command\install.py", line 62, in run
r = self.setuptools_run()
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\command\install.py", line 36, in setuptools_run
return distutils_install.run(self)
File "C:\Python36\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\command\build.py", line 47, in run
old_build.run(self)
File "C:\Python36\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\command\build_src.py", line 147, in run
self.build_sources()
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\command\build_src.py", line 158, in build_sources
self.build_library_sources(*libname_info)
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\command\build_src.py", line 293, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "C:\Users\info_000\AppData\Local\Temp\pip-build-ueljt0po\numpy\numpy\distutils\command\build_src.py", line 376, in generate_sources
source = func(extension, build_dir)
File "numpy\core\setup.py", line 653, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------
最佳答案
只要 3.6 的二进制包(所谓的“轮子”)尚未发布到 PyPi,您就可以求助于 http://www.lfd.uci.edu/~gohlke/pythonlibs/ 提供的非官方(但有效)包。 .下载文件并像这样安装它:
pip install C:\path\to\numpy‑1.11.3+mkl‑cp36‑cp36m‑win_amd64.whl
关于python - 如何为 Python 3.6 安装 NumPy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40893602/
关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭4年前。Improvethisquestion我想在固定时间创建一系列低音和高音调的哔哔声。例如:在150毫秒时发出高音调的蜂鸣声在151毫秒时发出低音调的蜂鸣声200毫秒时发出低音调的蜂鸣声250毫秒的高音调蜂鸣声有没有办法在Ruby或Python中做到这一点?我真的不在乎输出编码是什么(.wav、.mp3、.ogg等等),但我确实想创建一个输出文件。
我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po
我打算为ruby脚本创建一个安装程序,但我希望能够确保机器安装了RVM。有没有一种方法可以完全离线安装RVM并且不引人注目(通过不引人注目,就像创建一个可以做所有事情的脚本而不是要求用户向他们的bash_profile或bashrc添加一些东西)我不是要脚本本身,只是一个关于如何走这条路的快速指针(如果可能的话)。我们还研究了这个很有帮助的问题:RVM-isthereawayforsimpleofflineinstall?但有点误导,因为答案只向我们展示了如何离线在RVM中安装ruby。我们需要能够离线安装RVM本身,并查看脚本https://raw.github.com/wayn
我有一个奇怪的问题:我在rvm上安装了rubyonrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(
我刚刚为fedora安装了emacs。我想用emacs编写ruby。为ruby提供代码提示、代码完成类型功能所需的工具、扩展是什么? 最佳答案 ruby-mode已经包含在Emacs23之后的版本中。不过,它也可以通过ELPA获得。您可能感兴趣的其他一些事情是集成RVM、feature-mode(Cucumber)、rspec-mode、ruby-electric、inf-ruby、rinari(用于Rails)等。这是我当前用于Ruby开发的Emacs配置:https://github.com/citizen428/emacs
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我的最终目标是安装当前版本的RubyonRails。我在OSXMountainLion上运行。到目前为止,这是我的过程:已安装的RVM$\curl-Lhttps://get.rvm.io|bash-sstable检查已知(我假设已批准)安装$rvmlistknown我看到当前的稳定版本可用[ruby-]2.0.0[-p247]输入命令安装$rvminstall2.0.0-p247注意:我也试过这些安装命令$rvminstallruby-2.0.0-p247$rvminstallruby=2.0.0-p247我很快就无处可去了。结果:$rvminstall2.0.0-p247Search
我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121
由于fast-stemmer的问题,我很难安装我想要的任何rubygem。我把我得到的错误放在下面。Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingfast-stemmer:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcreatingMakefilemake"DESTDIR="cleanmake"DESTDIR=
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub