【问题标题】:Getting error while installing `pandas-profiling`安装“pandas-profiling”时出错
【发布时间】:2020-09-21 17:16:20
【问题描述】:

需要帮助我想在 python 3.8.2 中安装 pandas-profiling,但是当我尝试安装包时遇到错误。

pip install pandas-profiling

我收到了这个错误

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'f:\data analaysis\fbi crime rate\newenv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Manish\\AppData\\Local\\Temp\\pip-install-vz1xsz_s\\astropy\\setup.py'"'"'; __file__='"'"'C:\\Users\\Manish\\AppData\\Local\\Temp\\pip-install-vz1xsz_s\\astropy\\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\Manish\AppData\Local\Temp\pip-record-011lkvam\install-record.txt' --single-version-externally-managed --compile --install-headers 'f:\data analaysis\fbi crime rate\newenv\include\site\python3.8\astropy' Check the logs for full command output.

【问题讨论】:

  • 您安装了 Microsoft Visual C++ 14.0 吗?
  • 安装某些库时不会出现此错误
  • 好的。您是否查看过其他有相同问题的人的最佳答案? stackoverflow.com/questions/44951456/…stackoverflow.com/questions/29846087/…
  • 安装 Visual c++ 14 不是强制性的.....每当我在安装一些我通过 .whl 文件安装的包时遇到错误,所以我寻找这个库,但它不可用

标签: python pandas dataframe pandas-profiling


【解决方案1】:

Visual Studio changedBuild Tools 在 2017 年末成为 C++ 专用。因此,较新的 Visual Studio 版本可以代替旧版本。

使用以下任一选项安装:

  1. 微软Build Tools for Visual Studio

  2. Microsoft Build Tools for Visual Studio 的替代链接。

  3. 离线安装程序:vs_buildtools.exe
  4. Visual C++ 2015 Build Tools

选择:工作负载 → 使用 C++ 进行桌面开发,然后对于单个组件,仅选择:

  • Windows 10 SDK
  • C++ x64/x86 构建工具

构建工具允许从命令行使用 MSVC “cl.exe” C / C++ 编译器。

为什么这是必要的?

Windows Python 需要通过 SDK 安装 Visual C++ 库来构建代码,例如通过 setuptools.extension.Extension 或 numpy.distutils.core.Extension。例如,在 Windows 中使用 Python 构建 f2py 模块需要上面安装的 Visual C++ SDK。在 Linux 和 Mac 上,C++ 库随编译器一起安装。

【讨论】:

    猜你喜欢
    • 2022-10-05
    • 2022-07-06
    • 2019-11-06
    • 1970-01-01
    • 1970-01-01
    • 2017-09-11
    • 2021-03-24
    • 1970-01-01
    • 2022-07-19
    相关资源
    最近更新 更多