python - pip安装numpy失败错误代码1

标签 python python-2.7 numpy pip

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

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
  • 安装 Miniconda然后转到命令行并键入 conda install numpy(确保您的 PATH 包含 conda 安装到的位置)。

关于python - pip安装numpy失败错误代码1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19027324/

相关文章:

python - 合并磁盘上的大图像

python-2.7 - 如果相同的文件名已存在,则移动并替换?

Python - 两个信号与内部 NaN 的互相关

python - 停止无限 while 循环重复调用 os.system

python - ' ^' Character Matches Both ' <' and ' >' 在 Python 正则表达式中

python - 如何接收 Python 中发生的命令输出?

python - 打印没有换行符python

python - Psychopy 中的 Gamma 校正错误

Python使用pandas将numpy数组插入sqlite3数据库

python - 如何使用逐元素操作获取多个 numpy 保存数组的均值和标准差