windows 如何升级pip?

new9mtju  于 2023-05-30  发布在  Windows
关注(0)|答案(7)|浏览(227)

我想安装tensorflow,但我需要升级pip。如何升级pip?我试着通过命令行升级,这就是我得到的。

C:\Users\garoo>python -m pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python36-32\\lib\\site-packages\\pip-10.0.1.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.

You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\garoo>python -m pip install --upgrade pip
bcs8qyzn

bcs8qyzn1#

要从命令行升级pip:

python -m pip install --upgrade pip
mefy6pfw

mefy6pfw2#

您不需要升级pip来安装tensorflow。不过如果你还想这么做的话你可以试试这个

pip install --user --upgrade pip

否则尝试以管理员身份运行CMD

62o28rlo

62o28rlo3#

对于安装Python依赖项时的权限错误,您需要以administrator的身份运行终端或命令提示符或powershell
示例如下:

kwvwclae

kwvwclae4#

如何使用命令提示符升级pip:

  • 从开始菜单打开命令提示符
  • 单击左下角的“开始”按钮打开“开始”菜单
  • 在空框中输入cmd,然后在结果中点击命令提示符
  • 使用python -m pip install --upgrade pip卸载旧的pip软件包并安装当前版本。
Collecting pip
  Downloading pip-22.0.4-py3-none-any.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 284.1 kB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.0.3
    Uninstalling pip-22.0.3:
      Successfully uninstalled pip-22.0.3
Successfully installed pip-22.0.4
umuewwlo

umuewwlo5#

添加到@Iain Hunter的答案,如果命令提示符为您提供错误:

'python' is not recognized as an internal or external command,

可操作程序或批处理文件。
尝试将python -m pip install --upgrade pip更改为py -m pip install --upgrade pip。如果cmd仍然提供错误,请尝试再次下载Python;也许你在下载Python时不小心选中了下载pip框。

jvlzgdj9

jvlzgdj96#

好吧,有一个坏的休息目录命名.. pip-22.3.1.dist-info它停留作为下一个pip-23.1.2.dist-info安装好..所以我就删了这一条。现在的结果是C:\Windows\System32>python.exe -m pip install --upgrade pip已满足要求:pip in c:\users\USERNAME\appdata\local\programs\python\python310\lib\site-packages(23.1.2)

qq24tv8q

qq24tv8q7#

m pip install --upgrade pip

在终端上写入此子句,然后按Enter m pip install --upgrade pip

相关问题