如何升级pip?

Jam*_*son 27 python windows pip

我想安装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
Run Code Online (Sandbox Code Playgroud)

小智 36

要从命令行升级 pip:

python -m pip install --upgrade pip
Run Code Online (Sandbox Code Playgroud)


小智 11

您不需要升级 pip 来安装 TensorFlow。虽然如果你仍然想这样做你可以尝试这个

pip install --user --upgrade pip
Run Code Online (Sandbox Code Playgroud)

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


Jer*_*ril 1

对于安装Python依赖项时出现权限错误,需要运行终端或命令提示符或powershelladministrator

下面的例子:

在此输入图像描述