pip安装时setuptools报错解决

    ERROR: Command errored out with exit status 1:
     command: 'd:\git_honops\preparations\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-j8yvzjfn
\\MarkupSafe\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-j8yvzjfn\\MarkupSafe\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);c
ode=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Lenovo\AppData\Local\Temp\pip-install-j8yvzjfn\
MarkupSafe\pip-egg-info'
         cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-j8yvzjfn\MarkupSafe\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "", line 1, in <module>
      File "C:\Users\Lenovo\AppData\Local\Temp\pip-install-j8yvzjfn\MarkupSafe\setup.py", line 6, in <module>
        from setuptools import setup, Extension, Feature
    ImportError: cannot import name 'Feature'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

解决办法: pip install setuptools==45.2.0。(单独安装setuptools,然后在pip install -r requirements.txt就可以了)

你可能感兴趣的:(python)