pip fails to install numpy error code 1

2019-04-11 15:04发布

I'm trying to install numpy using pip. When I type pip install numpy in the command prompt it goes to work but won't install the file and returns an error code 1. I am using windows 8 64-Bit and python 2.7.This is the final bit of the error message

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

5条回答
爷的心禁止访问
2楼-- · 2019-04-11 15:44

Make sure you have python-dev installed (as you'll definitely see this same error if you don't).

dpkg -l python-dev
查看更多
做自己的国王
3楼-- · 2019-04-11 15:51

I would guess this is due to pip 1.3 has a bug dealing with ssl. There is a link here.

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-04-11 16:00

Some File can not be installed with pip and need to be installed from your platform’s packages.

So You guys can try this if nth work up there MAC With Macports

sudo port install 'package' 

With Homebrew:

brew install 'Package'
查看更多
放我归山
5楼-- · 2019-04-11 16:00

I downloaded python 37, and I customized install location. Then I tried to install numpy using pip: failed error code 1. Then I deleted python 37, downloaded python 36 without customizing install location. Then I installed numpy using pip: successful. Perhaps customizing install location caused the error.

查看更多
一纸荒年 Trace。
6楼-- · 2019-04-11 16:01

Installing extension modules can be an issue with pip. This is why conda exists. conda is an open-source BSD-licensed cross-platform package manager. It can easily install NumPy.

Two options:

查看更多
登录 后发表回答