我尝试在我的系统中安装 Tensor Flow,但出现以下错误
" Exception:
Traceback (most recent call last):
File "/home/vasudev/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/vasudev/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/vasudev/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/home/vasudev/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/home/vasudev/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/home/vasudev/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 300, in move
rmtree(src)
File "/usr/lib/python2.7/shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/usr/lib/python2.7/shutil.py", line 250, in rmtree
os.remove(fullname)
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/dist-packages/funcsigs/__init__.pyc' "
我已经更改了我的 Python 2.7 文件夹的权限,但在安装过程中仍然出现同样的错误。
请告知我安装过程中出现的问题。
答案1
您可以在这里看到有关如何在 Ubuntu 上安装 tensorflow 的详细/官方说明:https://www.tensorflow.org/get_started/os_setup
正如 grooveplex 所述 - 下面的错误的根源似乎是缺少写入权限。使用sudo
应该可以解决问题。
OSError:[Errno 13] 权限被拒绝