如何在下载tensorflow时摆脱这个错误?

时间:2018-02-20 08:23:05

标签: python tensorflow pip

   Exception:
Traceback (most recent call last):
  File "c:\program files\python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\program files\python36\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\program files\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "c:\program files\python36\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "c:\program files\python36\lib\site-packages\pip\wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "c:\program files\python36\lib\os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python36\\Lib\\site-packages\\numpy'
  

使用pip3 install --upgrade tensorflow-gpu下载tenserflow此链接导致此错误

2 个答案:

答案 0 :(得分:0)

基于追溯的最后一部分:

mkdir(name, mode)
PermissionError: [WinError 5] Access is denied

您没有创建目录的权限

以管理员身份启动命令行,然后重试

答案 1 :(得分:0)

使用管理员权限打开命令并运行相同的命令。要使用管理员权限打开cmd,请右键单击命令提示符快捷方式,然后选择"以管理员身份运行"。然后运行以下命令。

reyclerView