python - 尝试 pip install streamlit 时收到错误消息
问题描述
Windows 10。使用最新版本的 pip。蟒蛇 3.8.3。
收到此错误。
我尝试通过 pycharm 安装并得到同样的错误。
File "numpy\core\setup.py", line 667, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------
ERROR: Command errored out with exit status 1:
'C:\Users\thisuser\AppData\Local\Programs\Python\Python38-32\python.exe' -u -c 'import sys,
setuptools,
tokenize; sys.argv[0] = '"'"'C:\\Users\\thisuser\\AppData\\Local\\Temp\\pip-install-
t1sn8hyk\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\thisuser\\AppData\\Local\\Temp\\pip-
install-t1sn8hyk\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)
(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code,
__file__, '"'"'exec'"'"'))' install --record 'C:\Users\thisuser\AppData\Local\Temp\pip-record-
zxkfqpfd\install-record.txt' --single-version-externally-managed --prefix
'C:\Users\thisuser\AppData\Local\Temp\pip-build-env-t7emgfqy\overlay' --compile --install-headers
'C:\Users\thisuser\AppData\Local\Temp\pip-build-env-t7emgfqy\overlay\Include\numpy' Check the logs
for
full command output.
----------------------------------------
ERROR: Command errored out with exit status 1:
'C:\Users\thisuser\AppData\Local\Programs\Python\Python38-32\python.exe'
'C:\Users\thisuser\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pip' install --
ignore-installed --no-user --prefix 'C:\Users\thisuser\AppData\Local\Temp\pip-build-env-
t7emgfqy\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i
https://pypi.org/simple -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"''
numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel Check the logs for
full command output
解决方案
解决这个问题的最简单的方法,除了试图在 Windows 上为一个包安装 C 编译器之外,是从 Christoph Gohlke 的优秀的Unofficial Windows Binaries for Python Extension Packages站点安装NumPy 的预编译版本。我推荐 MKL(英特尔的数学内核库)版本,但他也有完全开源的“香草”版本。
只需下载.whl
与您的操作系统和 Python 版本对应的文件,然后运行
pip install wheel_filename.whl
从您将其下载到的任何目录中,您都将完成设置。如果任何其他pip install
命令在尝试编译 Python 包时中断,请先检查 Gohlke 的 repo!
推荐阅读
- android - 来自 firebase 实时的数据不会显示在我的 recyclerView 上
- html - 什么是 div class="navigation" 以及为什么使用它?
- java - 设置 connectTimeout 和 readTimeout 后 RestTemplate 未超时
- c# - 如何以同步方式合并两个 TPL DataFlow 管道?
- android - 如何用 Litho 替换现有文本?
- swift - 从 json 中获取数据并显示在选择器中
- excel-formula - 如何在不使用 MINIFS 的情况下在 excel 中获得以下结果?
- c# - 为什么我在 Visual Studio 中单击“添加项目”时没有 ADO.NET?
- trace32 - 函数T32_GetBreakpointList的python实现
- php - 通过 websocket 服务器从 http 访问的 PHP 发送数据