我正在尝试使用pip安装numpy.当我在命令提示符下键入pip install numpy时,它会继续工作但不会安装该文件并返回错误代码1.我使用的是Windows 8 64位和python 2.7.这是错误消息的最后一位
Cleaning up...
Removing temporary dir c:\users\pim\appdata\local\temp\pip_build_Pim...
Command python setup.py egg_info failed with error code 1 in c:\users\pim\appdata\local\temp\pip_build_Pim\numpy
Exception information:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\basecommand.py", line 134, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\commands\install.py", line 236, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\req.py", line 1134, in prepare_files
req_to_install.run_egg_info()
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\req.py", line 259, in run_egg_info
command_desc='python setup.py egg_info')
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\util.py", line 670, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in c:\users\pim\appdata\local\temp\pip_build_Pim\numpy
解决方法:
安装扩展模块可能是pip的问题.这就是conda存在的原因. conda是一个开源的BSD许可的跨平台包管理器.它可以轻松安装NumPy.
两种选择:
>安装Anaconda(http://www.continuum.io/downloads)
>安装Miniconda(http://repo.continuum.io/miniconda/index.html)然后转到命令行并键入conda install numpy(确保您的PATH包含已安装的conda的位置).
标签:python,pip,python-2-7,numpy
来源: https://codeday.me/bug/20190718/1492236.html