本文介绍了无法在 Windows 10 上更新 pip 的 PATH 变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有成千上万个类似的主题,但我的 pip 命令突然停止工作,尽管我做了所有的研究,但我还是不明白为什么.自从我上次使用 pip 已经有一段时间了,令人惊讶的是我的计算机不再识别该命令了.我重新安装了 pip,提示告诉我 PATH 变量没有正确更新.所以我更新了它,但这并不能解决问题,提示仍然告诉我 PATH 变量没有更新.我试过卸载并重新安装 python 和 pip,但没有任何效果.在我的环境变量中,我有一个名为 PATH 的用户变量和一个名为 PATH 的系统变量,它们都具有以下值:
C:\Users\mertz\AppData\Local\Programs\Python\Python38\Scripts\

I know there are thousands of similar topics but my pip command has suddenly stopped to work and, despite all my researchs, I can't figure out why. It has been a while since I last used pip and surprisingly my computer doesn't recognize the command anymore. I reinstalled pip and the prompt tells me that the PATH variable is not correctly updated. So I update it but that doesn't solve the problem, the prompt still tells me the PATH variable is not updated. I've tried uninstalling and reinstalling python and pip and nothing works.In my environment variables, I have a user variable named PATH and a system variable named PATH, both of them have the value :
C:\Users\mertz\AppData\Local\Programs\Python\Python38\Scripts\

用户变量已经自己写好了,系统变量是我自己写的.

The user variable was already written by itself and I had to write the system variable myself.

当我安装 pip 时,我收到此警告:

When I'm installing pip I get this warning :

警告:脚本 pip.exe、pip3.6.exe 和 pip3.exe 安装在不在 PATH 上的C:\Users\mertz\AppData\Local\Programs\Python\Python36-32\Scripts"中.考虑将此目录添加到 PATH 中,或者,如果您希望取消此警告,请使用 --no-warn-script-location.

当我在命令提示符下输入 pip 时,它告诉我无法识别 pip.

And when I type pip in the command prompt, it tells me that pip is not recognized.

我做错了什么?

提前致谢

推荐答案

我遇到了类似的问题,有一次:我只能使用管理权限使用 python cmdpip easy_install.

I had a similar problem, at one time: I could only use administrative privileges to use python cmd or pip easy_install.

请遵循以下程序:

  1. 通过按 window + r 并输入 sysdm.cpl 并单击确定来获取您的环境变量.

  1. Get to your environmental variables by pressing window + r and type-in, sysdm.cpl and click ok.

将pip链接目录复制到python中的脚本文件夹,但首先检查 pippip3easy_easy 等.如果它不包含pip,则必须卸载python并删除文件夹,然后重新安装python.

Copy the pip link directory to the script folder in python,but first check for pip, pip3, easy_easy, etc.If it doesn't contain pip, you have to uninstall python and delete the folder, and then reinstall python.

C:\Users\mickeymouse\AppData\Local\Programs\Python\Python38-32\Scripts.

  1. 您将看到用户变量和系统变量.(用户变量仅适用于该用户的帐户;系统变量适用于 PC 上的所有帐户).

为两者创建一个路径,然后重启cmd.

Create a path for both, then restart cmd.

这篇关于无法在 Windows 10 上更新 pip 的 PATH 变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 12:51