使用Python 3.8.5在Windows 10上进行绘图安装的问题



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

此处的包管理器pip3似乎正在安装运行错误的包retrying-1.3.3ModuleNotFoundError: No module named '_distutils_hack'

有人能解决这个问题吗?非常感谢您抽出时间。感谢

C:ProgramDataPython38Scripts>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:programdatapython38libsite-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:programdatapython38python.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('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:UsersstudentAppDataLocalTemppip-pip-egg-info-3tjoj6d_'
cwd: C:UsersstudentAppDataLocalTemppip-install-2qndeluwretrying_de785ef56b9d4150b577dd9f4437e271
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:programdatapython38libsite-packagessetuptools__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.

问题可能是"setuptools"包的版本太旧。当我以前遇到这个问题时,我刚刚更新了它。

pip install --upgrade setuptools

最新更新