gpt4 book ai didi

python - 我的 pip 在 Windows 上坏了,我该如何修复?

转载 作者:行者123 更新时间:2023-12-03 23:27:12 33 4
gpt4 key购买 nike

每当我尝试使用 pip 时,使用任何命令都会得到以下信息:

Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1008.0_x64__qzc5n2dfsdra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1008.0_x64__qzc5n2dfsd8p0\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\SE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_q3.8_qzc5n2dfsd8p0\LocalCache\local-packages\Python38\site-packages\pip\__main__.py", line 23, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "C:\Users\SE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qzc5n2dfsd8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\SE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qzc5n2dfsd8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\SE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qzc5n2dfsd8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\SE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qzc5n2dfsd8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\cmdoptions.py", line 24, in <module>
from pip._internal.cli.progress_bars import BAR_TYPES
File "C:\Users\SE\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qzc5n2dfsd8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\progress_bars.py", line 8, in <module>
from pip._vendor.progress.bar import Bar, FillingCirclesBar, IncrementalBar
ModuleNotFoundError: No module named 'pip._vendor.progress'
PS C:\Users\SE> No module named 'pip._vendor.progress'No module named 'pip._vendor.progress'

我使用的是 Windows 10,64 位,Python 版本 3.7.7。

我无法使用 pip,我该如何解决?

最佳答案

pip 尝试升级到较新版本后已损坏,请尝试以下操作:

  • 下载get-pip.py并使用右键单击“另存为”文件。
  • 以管理员身份打开命令提示符
  • cd 到您保存文件的路径,在我的情况下cd C:\Users\xyz\Downloads>然后输入 python get-pip.py .它将安装所有必需的软件包,例如 wheel pip .
  • 要检查它是否安装正确,请键入 pip --version在命令行中。

  • 希望我的回答对某人有所帮助。快乐编码。 🙂

    关于python - 我的 pip 在 Windows 上坏了,我该如何修复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62074986/

    33 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com