【问题标题】:How to solve error installing setuptools python in windows如何解决在 windows 中安装 setuptools python 时出错
【发布时间】:2020-01-19 22:47:22
【问题描述】:

有人可以帮我解决我挣扎了几个小时的问题吗,我正在尝试使用

安装“flask-jwt-extended”
pip install flask-jwt-extended

但我收到以下错误

ERROR: Command errored out with exit status 1:
     command: 'c:\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-fg_ccsgv\\flask-jwt-extended\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-fg_ccsgv\\flask-jwt-extended\\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 pip-egg-info
         cwd: C:\Users\User\AppData\Local\Temp\pip-install-fg_ccsgv\flask-jwt-extended\
    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.

它说我必须安装 setuptools,但我已经安装了它。

Requirement already satisfied: setuptools in c:\lib\site-packages (41.2.0)

有人可以帮我解决这个问题吗?我不知道会是什么

谢谢!

【问题讨论】:

  • 你试过用python -m pip install &lt;package&gt;代替pip install &lt;package&gt;吗?
  • @kuco23 是的,我有!

标签: python windows flask virtualenv setuptools


【解决方案1】:
pip install gitpython

pip install os-win

pip install wheel

在 Linux 上使用 sudo,在 Windows 上使用 run cmd as Administrator

这解决了我的问题。

【讨论】:

猜你喜欢
  • 2022-11-08
  • 2013-01-18
  • 2016-03-19
  • 2014-05-26
  • 1970-01-01
  • 1970-01-01
  • 2020-10-11
  • 1970-01-01
  • 2017-10-17
相关资源
最近更新 更多