Python Pip 安装:无法识别为批处理文件....在命令提示符中 windows
Python Pip installion: not recognised as a batch file.... in command prompt windows
我有一个项目需要安装numpy。
我今天早上刚把 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
这实际上是我重试安装的时候,这就是为什么一开始它说 "using cached numpy-1.10.2.tar.gz"
我不知道所有这些错误是什么意思,但我在某处看到一篇文章(在我无法重新找到的地方,所以我无法给出 link)说要安装通过在命令提示符中输入 pip:
python get-pip.py
或类似的东西。(正如我所说,无法重新找到那篇文章)
并收到此错误:
"python" is not recognized as an internal or external command, operable program or batch file
任何帮助都会很棒!
如果您有一种无需 pip 即可下载 numpy 的方法,那会很棒,但我还有一些其他模块需要获取,我真的很想让 pip 工作。
另外,我的网络非常糟糕,这有助于避免下载大文件。
谢谢
有 3 种方法可以解决这个问题。
您忘记了 C:/Python27/python get-pip.py
。您记得 pip
时这样做了,但您在 python get-pip.py
时放弃了。
另外,你需要C++,它在你的错误的最后一行说了。 error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
。正如它所说,获取 Visual C++。没有它,Pip 无法工作。
如果您对总是输入 C:/Python27/python
和 C:/Python27/Scripts/pip
感到困扰,请编辑您的 PATH 环境变量。你可以 Google 那。进入后,输入您的目录(例如 C:/Python27/python
)。所有目录都用分号分隔。
如果这有帮助,请加 1!
我有一个项目需要安装numpy。
我今天早上刚把 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
这实际上是我重试安装的时候,这就是为什么一开始它说 "using cached numpy-1.10.2.tar.gz"
我不知道所有这些错误是什么意思,但我在某处看到一篇文章(在我无法重新找到的地方,所以我无法给出 link)说要安装通过在命令提示符中输入 pip:
python get-pip.py
或类似的东西。(正如我所说,无法重新找到那篇文章)
并收到此错误:
"python" is not recognized as an internal or external command, operable program or batch file
任何帮助都会很棒! 如果您有一种无需 pip 即可下载 numpy 的方法,那会很棒,但我还有一些其他模块需要获取,我真的很想让 pip 工作。 另外,我的网络非常糟糕,这有助于避免下载大文件。
谢谢
有 3 种方法可以解决这个问题。
您忘记了
C:/Python27/python get-pip.py
。您记得pip
时这样做了,但您在python get-pip.py
时放弃了。另外,你需要C++,它在你的错误的最后一行说了。
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
。正如它所说,获取 Visual C++。没有它,Pip 无法工作。如果您对总是输入
C:/Python27/python
和C:/Python27/Scripts/pip
感到困扰,请编辑您的 PATH 环境变量。你可以 Google 那。进入后,输入您的目录(例如C:/Python27/python
)。所有目录都用分号分隔。
如果这有帮助,请加 1!