我想安装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
7条答案
按热度按时间bcs8qyzn1#
要从命令行升级pip:
mefy6pfw2#
您不需要升级pip来安装tensorflow。不过如果你还想这么做的话你可以试试这个
否则尝试以管理员身份运行CMD
62o28rlo3#
对于安装Python依赖项时的权限错误,您需要以
administrator
的身份运行终端或命令提示符或powershell示例如下:
kwvwclae4#
如何使用命令提示符升级pip:
cmd
,然后在结果中点击命令提示符python -m pip install --upgrade pip
卸载旧的pip
软件包并安装当前版本。umuewwlo5#
添加到@Iain Hunter的答案,如果命令提示符为您提供错误:
可操作程序或批处理文件。
尝试将
python -m pip install --upgrade pip
更改为py -m pip install --upgrade pip
。如果cmd
仍然提供错误,请尝试再次下载Python;也许你在下载Python时不小心选中了下载pip
框。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)
qq24tv8q7#
在终端上写入此子句,然后按Enter m pip install --upgrade pip