2013-09-26 77 views
2

我正在尝试使用PIP安装numpy。当我在命令提示符下键入pip install numpy时,它会开始工作,但不会安装该文件并返回错误代码1。我正在使用Windows 8 64位和python 2.7。这是错误消息的最后一位PIP无法安装numpy错误代码1

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 

回答

8

安装扩展模块可能是pip的问题。这就是conda存在的原因。 conda是一家开源BSD许可的跨平台软件包管理器。它可以轻松安装NumPy。

两个选项:

+1

谢谢,Anaconda解决了这个问题! – Pim

+0

谢谢,该作品!有官方网址:https://anaconda.org/anaconda/numpy –

1

我想这是由于点1.3有一个处理ssl的错误。有一个链接here

0

确保你安装了python-dev(因为如果你不这样做,你一定会看到这个相同的错误)。

dpkg -l python-dev 
+0

这可能应该是一个评论。 – Robert

1

某些文件无法与pip一起安装,需要通过平台的软件包进行安装。

所以你们可以在那里 MAC 试试这个,如果第n个工作随着MacPorts的

sudo port install 'package' 

随着家酿:

brew install 'Package' 
0

我下载蟒蛇37,和我定制的安装位置。然后我试图用pip安装numpy:失败的错误代码1. 然后我删除了python 37,下载了python 36而没有自定义安装位置。然后我使用pip安装numpy:成功。 也许定制安装位置会导致错误。