【问题标题】:Problems with installing plotly on Windows 10 with Python 3.8.5使用 Python 3.8.5 在 Windows 10 上安装 plotly 的问题
【发布时间】:2020-12-19 00:22:27
【问题描述】:

我在使用 Python 3.8.5 在 Windows 10 上安装 plotly 时遇到问题。命令行提示符处于管理员模式。

这里的包管理器pip3 似乎正在安装包retrying-1.3.3,它遇到了错误: ModuleNotFoundError: No module named '_distutils_hack'

有人对此有解决方案吗?非常感谢您的时间。谢谢

C:\ProgramData\Python38\Scripts>pip3 install plotly
Collecting plotly
  Using cached plotly-4.14.1-py2.py3-none-any.whl (13.2 MB)
Requirement already satisfied: six in c:\programdata\python38\lib\site-packages (from plotly) (1.15.0)
Collecting retrying>=1.3.3
  Using cached retrying-1.3.3.tar.gz (10 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\programdata\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\student\\AppData\\Local\\Temp\\pip-install-2qndeluw\\retrying_de785ef56b9d4150b577dd9f4437e271\\setup.py'"'"'; __file__='"'"'C:\\Users\\student\\AppData\\Local\\Temp\\pip-install-2qndeluw\\retrying_de785ef56b9d4150b577dd9f4437e271\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\student\AppData\Local\Temp\pip-pip-egg-info-3tjoj6d_'
         cwd: C:\Users\student\AppData\Local\Temp\pip-install-2qndeluw\retrying_de785ef56b9d4150b577dd9f4437e271\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\programdata\python38\lib\site-packages\setuptools\__init__.py", line 8, in <module>
        import _distutils_hack.override  # noqa: F401
    ModuleNotFoundError: No module named '_distutils_hack'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

【问题讨论】:

    标签: python plotly retrying


    【解决方案1】:

    问题可能是“setuptools”软件包的版本太旧。之前遇到这个问题的时候才更新一下。

    pip install --upgrade setuptools

    【讨论】:

    • 谢谢!这就是我最终所做的。
    猜你喜欢
    • 1970-01-01
    • 2020-08-09
    • 2021-09-16
    • 2021-12-28
    • 2021-03-28
    • 2020-05-16
    • 2017-06-08
    • 2020-04-10
    • 1970-01-01
    相关资源
    最近更新 更多