[英]How to install numpy on freshly installed Python 3.5 in Windows 10?
我只是在Pycharm的終端輸入
C:\Users\Me\PycharmProjects\SEMUA>python -m pip install numpy
然后發生這種情況。
Collecting numpy
Using cached numpy-1.11.1.zip
Installing collected packages: numpy
Running setup.py install for numpy ... error
Complete output from command C:\Users\Me\AppData\Local\Programs\Python\Python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Me\\AppData\\Local\\Temp\\pip-bu
ild-cj5a_4hi\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Me\AppData\Local\Temp
\pip-qkawsiyj-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,vml,guide not found in ['C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\libs'
]
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\libs']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Pytho
n35\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\
\libs']
NOT AVAILABLE
C:\Users\Me\AppData\Local\Temp\pip-build-cj5a_4hi\numpy\numpy\distutils\system_info.py:1646: 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:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\libs']
NOT AVAILABLE
C:\Users\Me\AppData\Local\Temp\pip-build-cj5a_4hi\numpy\numpy\distutils\system_info.py:1655: 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\Me\AppData\Local\Temp\pip-build-cj5a_4hi\numpy\numpy\distutils\system_info.py:1658: 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:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\libs']
NOT AVAILABLE
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\libs'
]
NOT AVAILABLE
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas,tatlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\lib
libraries lapack_atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\lib
libraries tatlas,tatlas not found in C:\
libraries lapack_atlas not found in C:\
libraries tatlas,tatlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\libs
libraries lapack_atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\libs
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
libraries satlas,satlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\lib
libraries lapack_atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\lib
libraries satlas,satlas not found in C:\
libraries lapack_atlas not found in C:\
libraries satlas,satlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\libs
libraries lapack_atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\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:\Users\Me\AppData\Local\Programs\Python\Python35\lib
libraries lapack_atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\libs
libraries lapack_atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\lib
libraries lapack_atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\libs
libraries lapack_atlas not found in C:\Users\Me\AppData\Local\Programs\Python\Python35\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
C:\Users\Me\AppData\Local\Temp\pip-build-cj5a_4hi\numpy\numpy\distutils\system_info.py:1548: 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:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users\\Me\\AppData\\Local\\Programs\\Python\\Python35\\libs']
NOT AVAILABLE
C:\Users\Me\AppData\Local\Temp\pip-build-cj5a_4hi\numpy\numpy\distutils\system_info.py:1559: 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\Me\AppData\Local\Temp\pip-build-cj5a_4hi\numpy\numpy\distutils\system_info.py:1562: 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:\Users\Me\AppData\Local\Programs\Python\Python35\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.5
creating build\src.win-amd64-3.5\numpy
creating build\src.win-amd64-3.5\numpy\distutils
building library "npymath" sources
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
error: Unable to find vcvarsall.bat
----------------------------------------
Command "C:\Users\Me\AppData\Local\Programs\Python\Python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Me\\AppData\\Local\\Temp\\pip-build-cj5a_4hi\\numpy\\set
up.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Me\AppData\Local\Temp\pip-qkawsiyj-record\ins
tall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Me\AppData\Local\Temp\pip-build-cj5a_4hi\numpy\
在上面輸入命令之前,我已經下載了此文件
numpy-1.11.1.zip
但不知道該怎么辦。
請幫助我或將我定向到任何可以解釋如何安裝numpy或像我這樣的新手/白痴的任何其他模塊的鏈接。
干杯。
Numpy利用編譯的C代碼來加速某些功能。 當安裝環境中沒有所需的編譯器時,安裝可能會失敗。
Christoph Gohlke的網站http://www.lfd.uci.edu/~gohlke/pythonlibs/為您提供了Numpy的編譯版本。
在網站上,找到基於您正在使用Win 32或Win 64的處理器的版本。
numpy-1.11.1 + mkl-cp35-cp35m-win32.whl或numpy-1.11.1 + mkl-cp35-cp35m-win_amd64.whl
其他答復也推薦了此文件,但沒有提供找到它的方法。
祝好運
下載此numpy-1.11.1 + mkl-cp35-cp35m-win_amd64.whl
為什么不從numpy網站本身呢? 因為我需要Visual Studio提供的某種VC編譯器來“ 正確 ”安裝它。
然后在終端中鍵入此(不確定pip3或pip3.5,但兩者都可以)
pip3 install /full/path/to/numpy-1.11.1+mkl-cp35-cp35m-win_amd64.whl
剩下的問題是如何設置我的python,以便我可以簡單地鍵入:
pip3 install module
以及如何更新模塊:)
多謝你們。
遵循標准方式: pip3 install numpy
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.