首页 > 解决方案 > 没有名为“setuptools”的模块

问题描述

我想安装xlwings,但是找不到setuptools。
我已经安装了 setuptools。
路径似乎没有问题。
我能怎么做?

终端

C:\>pip install setuptools
Collecting setuptools
  Using cached https://files.pythonhosted.org/packages/db/3c/1065553af43e5f388cb5ae96f44867470063a2d04c02551104dcb12794bd/setuptools-41.5.1-py2.py3-none-any.whl
Installing collected packages: setuptools
  WARNING: The scripts easy_install-3.7.exe and easy_install.exe are installed in 'c:Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed setuptools-41.5.1

C:\>pip install xlwings
Collecting xlwings
  Using cached https://files.pythonhosted.org/packages/bb/08/9719e055e57d4475e00e6a5a8c96a808433fe12f534ae818e90ed856b607/xlwings-0.16.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\temp\\pip-install-fmk5dya0\\xlwings\\setup.py'"'"'; __file__='"'"'C:\\temp\\pip-install-fmk5dya0\\xlwings\\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:\temp\pip-install-fmk5dya0\xlwings\pip-egg-info'
         cwd: C:\temp\pip-install-fmk5dya0\xlwings\
    Complete output (3 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

C:\>path
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Scripts\;C:\;C:\Users\AppData\Local\Programs\Python\Launcher\;C:\Users\AppData\Local\Microsoft\WindowsApps;C:\Lib;C:\Windows\SysWOW64\Lib

标签: pythonpython-3.xsetuptools

解决方案


最终我转向使用 Anaconda 来解决这个问题。


推荐阅读