如何使用 pip install 在 Windows 上安装 numpy? [英] How to install numpy on windows using pip install?

查看:24
本文介绍了如何使用 pip install 在 Windows 上安装 numpy?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 pip install numpy 命令安装 numpy,但出现以下错误:

I want to install numpy using pip install numpy command but i get follwing error:

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 安装.

I'm using windows 7 32bit, python 2.7.9, pip 6.1.1 and some MSVC compiler. I think it uses compiler from Visual C++ 2010 Express, but actually I'm not sure which one because I have several visual studio installations.

我知道有适用于 Windows 的预构建包,但我想知道是否有某种方法可以通过键入 pip install numpy 来实现?

I know that there are prebuilt packages for windows but I want to figure out if there is some way to do it just by typing pip install numpy?

我认为可能还有其他包必须在使用前编译,所以它不仅仅是关于 numpy.我想用我的编译器解决这个问题,这样我就可以轻松安装任何其他类似的包,而无需搜索预构建的包(并希望有一些)

I think that there could be other packages which must be compiled before usage, so it's not only about numpy. I want to solve the problem with my compiler so I could easily install any other similar package without necessity to search for prebuilt packages (and hope that there are some at all)

推荐答案

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

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.

两个选项:

  • 此处
  • 安装 Anaconda
  • 此处安装 Miniconda,然后在命令行中输入 conda install numpy代码>(确保您的 PATH 包含安装 conda 的位置).
  • Install Anaconda here
  • Install Miniconda here and then go to a command-line and type conda install numpy (make sure your PATH includes the location conda was installed to).

这篇关于如何使用 pip install 在 Windows 上安装 numpy?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆