Python Pip安装:未识别为批处理文件。。。。在命令提示窗口中
我有一个项目,需要安装numpy 就在今天早上,我将Python2.7.11下载到了我的Windows10计算机上,自从下载之后,我就没有在2.7.11安装中使用过pip或其他任何东西 我没有移动安装2.7.11中的任何文件 我打开命令提示符并键入Python Pip安装:未识别为批处理文件。。。。在命令提示窗口中,python,windows,numpy,command-prompt,Python,Windows,Numpy,Command Prompt,我有一个项目,需要安装numpy 就在今天早上,我将Python2.7.11下载到了我的Windows10计算机上,自从下载之后,我就没有在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 接下来,我
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
或者类似的东西。(就像我说的,找不到那篇文章)
得到了这个错误:
"python" is not recognized as an internal or external command, operable program or batch file
任何帮助都会很好!
如果你有一种不用pip下载numpy的方法,那就太好了,但是我还需要一些其他模块,我真的很想让pip正常工作。
另外,我的互联网非常糟糕,避免下载大量文件会很有帮助
谢谢有三种方法可以解决这个问题
C:/Python27/python get pip.py
。您记得为pip
这样做,但放弃了python get pip.py
C:/Python27/python
和C:/Python27/Scripts/pip
而感到烦恼,请编辑PATH环境变量。你可以用谷歌搜索。进入后,键入目录(例如C:/Python27/python
)。所有目录都用分号分隔如果这有帮助的话,添加一个+1 在windows上,改为安装二进制文件。签出或编辑PATH环境变量以包含python位置…Windows用户的另一个极好的选择是安装PATH环境变量。PATH环境变量是系统中的一个设置,它允许在列出的目录中运行
.exe
,只需绑定.exe
(不带扩展名!)谢谢你的回答。正如我所说,我有非常慢的互联网,所以我不知道是否VisualC++是唯一的问题,虽然它看起来是有可能的(并且,如果你看看我的名声,在这一点上,我完全没有,所以我现在不能+ 1)在Windows上,PIP是用Python 2.7分发,所以不需要运行GET-PI.py..PATH
搜索任何文件,而不仅仅是.exe文件。cmd shell还将尝试使用附加的PATHEXT
中的每个扩展名进行搜索,直到找到匹配项。在Windows API中,CreateProcess
和LoadLibrary
也有一个部分基于path
的搜索路径。如果省略扩展名,它们会将默认值分别硬编码为“.EXE”和“.DLL”。
"python" is not recognized as an internal or external command, operable program or batch file