如何使用 pip install 在 windows 上安装 numpy?
How to install numpy on windows using pip install?
我想使用 pip install numpy
命令安装 numpy,但出现以下错误:
RuntimeError: Broken toolchain: cannot link a simple C program
我正在使用 windows 7 32 位、python 2.7.9、pip 6.1.1 和一些 MSVC 编译器。我认为它使用 Visual C++ 2010 Express 的编译器,但实际上我不确定是哪一个,因为我安装了多个 visual studio。
我知道有 windows 的预构建包,但我想知道是否有某种方法可以通过键入 pip install numpy
?
来完成
编辑:
我认为可能还有其他包在使用前必须编译,所以它不仅仅是关于 numpy。我想用我的编译器解决这个问题,这样我就可以轻松地安装任何其他类似的包,而无需搜索预构建的包(并希望有一些)
检查 python 2.7 的安装比 install/reinstall pip 描述 here 然后打开命令行并写入
pip install numpy
或
pip install scipy
如果已经安装试试这个
pip install -U numpy
安装扩展模块可能是 pip 的一个问题。这就是 conda 存在的原因。 conda 是一个开源 BSD 许可的跨平台包管理器。它可以轻松安装 NumPy。
两个选项:
令人沮丧的是,发布到 PyPI 的 Numpy 包不会安装在大多数 Windows 计算机上 https://github.com/numpy/numpy/issues/5479
改为:
- 从 http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
下载适用于您的 Python 版本的 Numpy wheel
- 从命令行安装它
pip install numpy-1.10.2+mkl-cp35-none-win_amd64.whl
截至 2016 年 3 月,pip install numpy
在没有 Fortran 编译器的情况下可以在 Windows 上运行。参见 here。
pip install scipy
仍在尝试使用编译器。
2018 年 7 月:mojoken 报告 pip install scipy
在没有 Fortran 编译器的情况下 Windows 工作。
首先完成这个 link https://www.python.org/downloads/ to download python 3.6.1 or 2.7.13 either of your choice.I preferred to use python 2.7 or 3.4.4 .now after installation go to the folder name python27/python34 then click on script now here open the command prompt by left click ad run as administration. After the command prompt appear write their "pip install numpy" this will install the numpy latest version and installing it will show success comment that's all. Similarly matplotlib can be install by just typing "pip install matplotlip". And now if you want to download scipy then just write "pip install scipy" and if it doesn't work then you need to download python scipy from the link https://sourceforge.net/projects/scipy/ 并安装它。
我遇到了同样的问题。
我以一种非常出乎意料的方式做出了决定。
刚刚以管理员身份打开命令行。然后输入:
pip install numpy
安装 miniconda (here)
安装后,打开Anaconda Prompt(在开始菜单中搜索)
写:
pip install numpy
安装后,测试:
import numpy as np
py -m pip install numpy
对我有用!
我想使用 pip install numpy
命令安装 numpy,但出现以下错误:
RuntimeError: Broken toolchain: cannot link a simple C program
我正在使用 windows 7 32 位、python 2.7.9、pip 6.1.1 和一些 MSVC 编译器。我认为它使用 Visual C++ 2010 Express 的编译器,但实际上我不确定是哪一个,因为我安装了多个 visual studio。
我知道有 windows 的预构建包,但我想知道是否有某种方法可以通过键入 pip install numpy
?
编辑: 我认为可能还有其他包在使用前必须编译,所以它不仅仅是关于 numpy。我想用我的编译器解决这个问题,这样我就可以轻松地安装任何其他类似的包,而无需搜索预构建的包(并希望有一些)
检查 python 2.7 的安装比 install/reinstall pip 描述 here 然后打开命令行并写入
pip install numpy
或
pip install scipy
如果已经安装试试这个
pip install -U numpy
安装扩展模块可能是 pip 的一个问题。这就是 conda 存在的原因。 conda 是一个开源 BSD 许可的跨平台包管理器。它可以轻松安装 NumPy。
两个选项:
令人沮丧的是,发布到 PyPI 的 Numpy 包不会安装在大多数 Windows 计算机上 https://github.com/numpy/numpy/issues/5479
改为:
- 从 http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy 下载适用于您的 Python 版本的 Numpy wheel
- 从命令行安装它
pip install numpy-1.10.2+mkl-cp35-none-win_amd64.whl
截至 2016 年 3 月,pip install numpy
在没有 Fortran 编译器的情况下可以在 Windows 上运行。参见 here。
pip install scipy
仍在尝试使用编译器。
2018 年 7 月:mojoken 报告 pip install scipy
在没有 Fortran 编译器的情况下 Windows 工作。
首先完成这个 link https://www.python.org/downloads/ to download python 3.6.1 or 2.7.13 either of your choice.I preferred to use python 2.7 or 3.4.4 .now after installation go to the folder name python27/python34 then click on script now here open the command prompt by left click ad run as administration. After the command prompt appear write their "pip install numpy" this will install the numpy latest version and installing it will show success comment that's all. Similarly matplotlib can be install by just typing "pip install matplotlip". And now if you want to download scipy then just write "pip install scipy" and if it doesn't work then you need to download python scipy from the link https://sourceforge.net/projects/scipy/ 并安装它。
我遇到了同样的问题。 我以一种非常出乎意料的方式做出了决定。 刚刚以管理员身份打开命令行。然后输入:
pip install numpy
安装 miniconda (here)
安装后,打开Anaconda Prompt(在开始菜单中搜索)
写:
pip install numpy
安装后,测试:
import numpy as np
py -m pip install numpy
对我有用!