我有一个项目,需要安装numpy。Python Pip安装:无法识别为批处理文件....在命令提示符窗口
我今天早上下载了Python 2.7.11到我的windows 10电脑,并且自下载以来没有在2.7.11安装中使用pip或其他任何东西。
我没有移动安装2.7.11中的任何文件。
我打开命令提示符和类型
pip install numpy
,并得到了错误:
pip is not recognized as an internal or external command, operable program or batch file
接下来,我把:
cd C:\Python27\Scripts
到命令提示符。它去了,我再次输入:
pip install numpy
它工作了一段时间,下载numpy没有问题。然后:
C:\Python27\Scripts>pip install numpy
Collecting numpy
Using cached numpy-1.10.2.tar.gz
Installing collected packages: numpy
Running setup.py install for numpy
Complete output from command c:\python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\goerge\\appdata\\local\\temp\\pip-build-fj7fw1\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\goerge\appdata\local\temp\pip-duza5s-record\install-record.txt --single-version-externally-managed --compile:
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python27\\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python27\\libs']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python27\\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python27\\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
blas_info:
libraries blas not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python27\\libs']
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
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:\\python27\\lib', 'C:\\', 'c:\\python27\\libs']
NOT AVAILABLE
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python27\\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas,tatlas not found in c:\python27\lib
libraries lapack_atlas not found in c:\python27\lib
libraries tatlas,tatlas not found in C:\
libraries lapack_atlas not found in C:\
libraries tatlas,tatlas not found in c:\python27\libs
libraries lapack_atlas not found in c:\python27\libs
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
libraries satlas,satlas not found in c:\python27\lib
libraries lapack_atlas not found in c:\python27\lib
libraries satlas,satlas not found in C:\
libraries lapack_atlas not found in C:\
libraries satlas,satlas not found in c:\python27\libs
libraries lapack_atlas not found in c:\python27\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:\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
<class '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
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python27\\libs']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
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.win32-2.7
creating build\src.win32-2.7\numpy
creating build\src.win32-2.7\numpy\distutils
building library "npymath" sources
Running from numpy source directory.
c:\users\goerge\appdata\local\temp\pip-build-fj7fw1\numpy\numpy\distutils\system_info.py:1651: 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:\users\goerge\appdata\local\temp\pip-build-fj7fw1\numpy\numpy\distutils\system_info.py:1660: 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:\users\goerge\appdata\local\temp\pip-build-fj7fw1\numpy\numpy\distutils\system_info.py:1663: 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:\users\goerge\appdata\local\temp\pip-build-fj7fw1\numpy\numpy\distutils\system_info.py:1552: 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:\users\goerge\appdata\local\temp\pip-build-fj7fw1\numpy\numpy\distutils\system_info.py:1563: 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:\users\goerge\appdata\local\temp\pip-build-fj7fw1\numpy\numpy\distutils\system_info.py:1566: 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)
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
----------------------------------------
Command "c:\python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\goerge\\appdata\\local\\temp\\pip-build-fj7fw1\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\goerge\appdata\local\temp\pip-duza5s-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\goerge\appdata\local\temp\pip-build-fj7fw1\numpy
其实,这是当我重试安装,这就是为什么在一开始它说:“使用缓存numpy的-1.10.2.tar.gz”
我不知道所有的错误意思,但我看到一篇文章的地方(在一个地方,我不能重新找到,所以我不能给的链接),表示通过键入到命令提示符安装PIP:
python get-pip.py
什么(正如我所说,不能重新找到那篇文章)
,并得到这个错误:
"python" is not recognized as an internal or external command, operable program or batch file
任何帮助将是巨大的! 如果你有一种方法来下载没有点子的numpy,那将是非常棒的,但是我还有其他一些模块需要获得,我非常希望得到pip的工作。 此外,我有非常糟糕的互联网,这将有助于避免大文件下载。
谢谢
在窗口上,改为安装二进制文件。查看[非官方Windows二进制文件](http://www.lfd.uci.edu/~gohlke/pythonlibs/) –
或编辑您的PATH环境变量以包含python位置... –
Windows用户的另一个优秀选择是安装[Anaconda Python发行版](https://www.continuum.io/downloads) –