最近重新安装TensorFlow过程中突然冒出了pip 版本需要更新的异常问题,具体如下:
Youare using pip version 9.0.1, however version 10.0.1 is available.
Youshould consider upgrading via the 'python -m pip install --upgrade pip'command.
然后执行以上蓝色命令时却抛出异常了,如下
Exception:
Traceback (most recent call last):
File"C:\Program Files\Python36\lib\shutil.py", line 544, in move
os.rename(src, real_dst)
PermissionError: [WinError 5] 拒绝访问。:'c:\\program files\\python36\\lib\\site-packages\\pip-9.0.1.dist-info\\description.rst'
. . . . . .
PermissionError: [WinError 5] 拒绝访问。:'c:\\programfiles\\python36\\lib\\site-packages\\pip-9.0.1.dist-info\\description.rst'
You are using pip version 9.0.1, howeverversion 10.0.1 is available.
You should consider upgrading via the 'python-m pip install --upgrade pip' command.
最后发现原来是pip的更新需要在以管理员的身份执行命令才行。Win10下的管理员命令窗口好像是PowerShell,cmd的管理员身份没去找,鼠标在屏幕右下角双击,便会出现系统管理功能列表,其中有一行为PowerShell 管理员(A), 最后提示安装成功,