pythonplotlyretrying

Problems with installing plotly on Windows 10 with Python 3.8.5


I am having problems installing plotly on Windows 10 with Python 3.8.5. The command line prompt is in admin mode.

The package manager pip3 here seems to be installing the package retrying-1.3.3 which is running into an error: ModuleNotFoundError: No module named '_distutils_hack'

Anybody has a solution for this? Greatly appreciate your time. Thanks

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.

Solution

  • The problem may be that the version of the 'setuptools' package is too old. I just updated it when I encountered this problem before.

    pip install --upgrade setuptools