首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >尝试pip install streamlit时出现错误

尝试pip install streamlit时出现错误
EN

Stack Overflow用户
提问于 2020-07-31 04:42:13
回答 2查看 1.1K关注 0票数 0

Windows 10.使用最新版本的pip。python 3.8.3。

获取此错误。

我试着通过pycharm安装,得到了同样的错误。

代码语言:javascript
运行
复制
    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
EN

回答 2

Stack Overflow用户

发布于 2020-07-31 05:38:06

要解决这个问题,最简单的方法是从Christoph Gohlke的优秀Unofficial Windows Binaries for Python Extension Packages站点安装一个pre-compiled version of NumPy,而不是尝试为一个软件包在Windows上安装C编译器。我推荐MKL (Intel's Math Kernel Library)版本,但他也有完全开源的“香草”版本。

只需下载与您的操作系统和Python版本对应的.whl文件,然后运行

代码语言:javascript
运行
复制
pip install wheel_filename.whl

从您下载到的任何目录中,您都可以完成所有设置。如果任何其他pip install命令在尝试编译Python包时中断,请首先检查Gohlke的repo!

票数 1
EN

Stack Overflow用户

发布于 2021-02-19 04:19:20

https://pypi.org/simple/streamlit/下载适当的版本

我使用的是StreamLight0.62.1Python3.8.5,它工作得很好。

我尝试了streamlit 0.76.0的最新版本,但在安装时出现错误

pip安装C:\downloads\streamlit-0.62.1-py2.py3-none-any.whl

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63181093

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档