【发布时间】:2018-09-10 21:15:50
【问题描述】:
系统:
Windows 10
Python 3.7
Numpy 1.15.1
VS 2017
我不认为这是重复的,因为以下提议的解决方案失败了:
- (对于自制软件 - 不适用) Numpy Install RuntimeError: Broken toolchain: cannot link a simple C program
- (未答复)PyCharm pip installs fail, RuntimeError: Broken toolchain: cannot link a simple C program
- (Windows 没有 sudo) Problems with pip install numpy - RuntimeError: Broken toolchain: cannot link a simple C program
补充说明: 我没有网络访问权限,所以我正在使用“篮子” 我的安装线如下:
pip install --no-index -f .basked numpy
我已经在 command prompt、power shell 和 VS command prompt 中运行了这个
回溯中的最终错误:
377, in generate_sources
source = func(extension, build_dir)
File "numpy\core\setup.py", line 666, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
【问题讨论】:
-
推测,NumPy 找不到 C 链接器(或编译器)。我想那是因为 NumPy 安装了轮子或其他形式的预编译二进制文件。您必须通过设置正确的路径值来确保 C 编译器和链接器在命令提示符或 shell 中可用。可能,VS 应该在其设置中的某个位置显示这些程序所在的位置。
-
编译比较难,也许你可以下载anaconda
-
不幸的是,我不能使用 anaconda 来解决这个问题
-
@9769953 那么在路径变量中加入VS?
标签: python-3.x numpy