无法安装 streamlit 库 [关闭]

Posted

技术标签:

【中文标题】无法安装 streamlit 库 [关闭]【英文标题】:Failing to install streamlit library [closed] 【发布时间】:2021-01-10 05:39:43 【问题描述】:

我一直在尝试在我的 VSCode 上安装 streamlit,但它不断弹出以下错误: 错误:命令出错,退出状态为 1: 命令:'c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\python.exe' 'c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib\ site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-build-env-6ua2jpht\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'"'"'' setuptools setuptools_scm wheel cwd:无 完整输出(294 行): 忽略 numpy:标记 'python_version =0.29 使用缓存的 Cython-0.29.21-cp38-cp38-win32.whl (1.6 MB) 收集numpy==1.16.0 使用缓存的 numpy-1.16.0.zip (5.1 MB) 收集设置工具 使用缓存的 setuptools-50.3.0-py3-none-any.whl (785 kB) 收集 setuptools_scm 使用缓存的 setuptools_scm-4.1.2-py2.py3-none-any.whl (27 kB) 收集轮 使用缓存的 wheel-0.35.1-py2.py3-none-any.whl (33 kB) 对 numpy 使用旧版“setup.py install”,因为未安装包“wheel”。 安装收集的包:cython、numpy、setuptools、setuptools-scm、wheel 为 numpy 运行 setup.py install: 开始 为 numpy 运行 setup.py install:完成状态为“错误” 错误:命令出错,退出状态为 1: 命令:'c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\python.exe'-u -c'import sys,setuptools,tokenize; sys.argv[0] = '"'"'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\setup.py'"'"'; 文件='"'"'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\setup.py'"'"';f=getattr(tokenize , '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"' , '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'安装 --record 'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-record-mptv_yrl\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-build-env-6ua2jpht\overlay' --compile --install-headers 'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-build-env-6ua2jpht\overlay \包括\numpy' cwd: C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy 完整输出(273 行): 从 numpy 源目录运行。

  Note: if you need reliable uninstall behavior, then install
  with pip instead of using `setup.py install`:

    - `pip install .`       (from a git repo or downloaded source
                             release)
    - `pip install numpy`   (last NumPy release on PyPi)


  C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\numpy\distutils\misc_util.py:476: SyntaxWarning: "is" with a literal. Did you mean "=="?
    return is_string(s) and ('*' in s or '?' is s)
  blas_opt_info:
  blas_mkl_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries mkl_rt not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  blis_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries blis not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  openblas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries openblas not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
  get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'  
  customize GnuFCompiler
  Could not locate executable g77
  Could not locate executable f77
  customize IntelVisualFCompiler
  Could not locate executable ifort
  Could not locate executable ifl
  customize AbsoftFCompiler
  Could not locate executable f90
  customize CompaqVisualFCompiler
  Could not locate executable DF
  customize IntelItaniumVisualFCompiler
  Could not locate executable efl
  customize Gnu95FCompiler
  Could not locate executable gfortran
  Could not locate executable f95
  customize G95FCompiler
  Could not locate executable g95
  customize IntelEM64VisualFCompiler
  customize IntelEM64TFCompiler
  Could not locate executable efort
  Could not locate executable efc
  customize PGroupFlangCompiler
  Could not locate executable flang
  don't know how to compile Fortran code on platform 'nt'
    NOT AVAILABLE

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries tatlas not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  atlas_3_10_blas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries satlas not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries ptf77blas,ptcblas,atlas not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  atlas_blas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries f77blas,cblas,atlas not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 

'c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\libs'] 不可用

  accelerate_info:
    NOT AVAILABLE

  C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\numpy\distutils\system_info.py:625: UserWarning:
      Atlas (http://math-atlas.sourceforge.net/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [atlas]) or by setting
      the ATLAS environment variable.
    self.calc_info()
  blas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries blas not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\numpy\distutils\system_info.py:625: UserWarning:
      Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
    self.calc_info()
  blas_src_info:
    NOT AVAILABLE

  C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\numpy\distutils\system_info.py:625: UserWarning:
      Blas (http://www.netlib.org/blas/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [blas_src]) or by setting
      the BLAS_SRC environment variable.
    self.calc_info()
    NOT AVAILABLE

  'svnversion' is not recognized as an internal or external command,
  operable program or batch file.
  non-existing path in 'numpy\\distutils': 'site.cfg'
  lapack_opt_info:
  lapack_mkl_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries mkl_rt not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  openblas_lapack_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries openblas not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  openblas_clapack_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries openblas,lapack not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries tatlas,tatlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries tatlas,tatlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\libs
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries tatlas,tatlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\libs
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE

  atlas_3_10_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries satlas,satlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries satlas,satlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\libs
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries satlas,satlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\libs
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE

  atlas_threads_info:
  Setting PTATLAS=ATLAS
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries ptf77blas,ptcblas,atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries ptf77blas,ptcblas,atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\libs
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries ptf77blas,ptcblas,atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\libs
  <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE

  atlas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries f77blas,cblas,atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries f77blas,cblas,atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\libs
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries f77blas,cblas,atlas not found in c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\libs
  <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE

  lapack_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack not found in ['c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\king_joseph ruvinga\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\numpy\distutils\system_info.py:625: UserWarning:
      Lapack (http://www.netlib.org/lapack/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [lapack]) or by setting
      the LAPACK environment variable.
    self.calc_info()
  lapack_src_info:
    NOT AVAILABLE

  C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\numpy\distutils\system_info.py:625: UserWarning:
      Lapack (http://www.netlib.org/lapack/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [lapack_src]) or by setting
      the LAPACK_SRC environment variable.
    self.calc_info()
    NOT AVAILABLE

  c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 

'define_macros' 警告。警告(味精) 运行安装 运行构建 运行 config_cc 统一 config_cc、config、build_clib、build_ext、构建命令 -- 编译器选项 运行 config_fc 统一 config_fc、config、build_clib、build_ext、构建命令 --fcompiler 选项 运行 build_src build_src 构建 py_modules 源 创建构建 创建 build\src.win32-3.8 创建 build\src.win32-3.8\numpy 创建 build\src.win32-3.8\numpy\distutils 构建库“npymath”源 numpy.distutils 中没有名为“numpy.distutils._msvccompiler”的模块;从 distutils 尝试 错误:需要 Microsoft Visual C++ 14.0。使用“Visual Studio 构建工具”获取它:https://visualstudio.microsoft.com/downloads/ -------------------------------------- 错误:命令出错,退出状态为 1:'c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\setup.py'"'"'; 文件='"'"'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-install-od59egr2\numpy\setup.py'"'"';f=getattr(tokenize , '“'“'打开'”'”', open)(文件);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"' );f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\King_Joseph Ruvinga\ AppData\Local\Temp\pip-record-mptv_yrl\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-build-env -6ua2jpht\overlay' --compile --install-headers 'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-build-env-6ua2jpht\overlay\Include\numpy' 检查日志以获取完整的命令输出。

错误:命令出错,退出状态为 1:'c:\users\king_joseph ruvinga\appdata\local\programs\python\python38-32\python.exe''c:\users\king_joseph ruvinga\appdata\local \programs\python\python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\King_Joseph Ruvinga\AppData\Local\Temp\pip-build- env-6ua2jpht\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'"'"'' setuptools setuptools_scm wheel 检查日志以获取完整的命令输出。

您的帮助会有所帮助。谢谢你

【问题讨论】:

请提供更多信息。您尝试使用什么进行安装? 如果您在安装 Microsoft Visual C++ 14.0 后遇到任何错误。请尝试以下操作 - 您已安装 python 3.8 32 位。我认为 Streamlit 不支持 32 位 python。我最近在 PyCharm 中遇到了这个问题。从下面的链接卸载 32 位 python 并安装 64 位,然后尝试安装 Streamlit。 python.org/ftp/python/3.8.5/python-3.8.5-amd64.exe 【参考方案1】:

错误信息告诉你错误是什么以及解决方法:

error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

【讨论】:

以上是关于无法安装 streamlit 库 [关闭]的主要内容,如果未能解决你的问题,请参考以下文章

Macbook 上的 Streamlit

无法在命令提示符下使用 pip 下载 streamlit

streamlit 数据简易可视化的web库

streamlit 数据简易可视化的web库

打开wps软件的word,Excel等,总弹出对话框“无法定位程序输入点”于动态链接库”上,如何解决啊!

pycharm关闭后需要重新安装