【问题标题】:Py 3.8.2 pip missingPy 3.8.2 点缺失
【发布时间】:2020-05-09 16:27:41
【问题描述】:

我在一天前确实使用了 pip,而现在,即使在升级之前,pip 似乎已经消失了。 Python 肯定在我的路径中,但是 CMD 提示不识别 pip,一直说有一个 SyntaxError:

我 dld get-pip 并在 vs 代码中运行它,它说

[Running] /usr/bin/env python "c:\Users\P\Desktop\get-pip.py"
The system cannot find the path specified.

[Done] exited with code=1 in 25.392 seconds

[Running] /usr/bin/env python "c:\Users\P\Desktop\get-pip.py"
The system cannot find the path specified.

[Done] exited with code=1 in 0.086 seconds

[Running] /usr/bin/env python "c:\Users\P\Desktop\tempCodeRunnerFile.py"
The system cannot find the path specified.

[Done] exited with code=1 in 0.143 seconds

我正在尝试加载 pygame,然后它就开始了。欢迎提出任何建议,这也是我的 PATH 目录:

C:\Users\P\AppData\Local\Programs\Python\Python38\;C:\Users\P\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\P\AppData\Roaming\Scripts;C:\Users\P\AppData\Roaming\npm

【问题讨论】:

  • 请edit 发布以显示SyntaxError 及其回溯。 python3 存在吗?你可以运行python3 -m pip 吗?您的 PATH 建议您在 Windows 上,但尝试运行 /usr/bin/env python 建议 UNIX - 它是什么?
  • /usr/bin/env - 是一个 linux 语句。您的脚本不是设计为在 linux 中运行,还是在您的 Windows 系统上安装的 linux 模拟器(如 Git Bash/Cygwin)中运行?无论如何,正如MisterMiyagi 所说,您提供的不足。改变它,你就会得到投票。
  • 好像是8.2的问题,不知道为什么。

标签: python visual-studio-code pip


【解决方案1】:

看起来文件不存在?您必须先download get-pip.py 文件才能使用它。

【讨论】:

  • 可能不是问题。错误消息似乎来自 shell,而不是 Python。这意味着找不到/usr/bin/env 或python。如果这是 Python 中的问题,就会有堆栈跟踪。
  • 它在 vs 代码中,所以是 shell,但在 vs 代码中调用了输出。
【解决方案2】:

已修复,卸载 8.2 并返回到 8.1,现在可以正常工作,使用 pip。感谢所有的帮助,非常感谢。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-08-22
    • 1970-01-01
    • 2014-05-25
    • 2020-10-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-09
    相关资源
    最近更新 更多