簡體   English   中英

在 Ubuntu 16.04 上安裝 TensorFlow 時出錯?

[英]Getting error while installing TensorFlow on Ubuntu 16.04?

我收到錯誤**PermissionError: [Errno 13]** Permission denied: '/usr/local/lib/python3.5/dist-packages/protobuf-3.1.0.post1-py2.7-nspkg.pth當我運行pip install tensorflow-gpu

pip install tensorflow-gpu
Collecting tensorflow-gpu
Using cached tensorflow_gpu-0.12.1-cp35-cp35m-manylinux1_x86_64.whl
Requirement already satisfied: numpy>=1.11.0 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu)
Collecting protobuf>=3.1.0 (from tensorflow-gpu)
Using cached protobuf-3.1.0.post1-py2.py3-none-any.whl
Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from tensorflow-gpu)
Requirement already satisfied: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow-gpu)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from protobuf>=3.1.0->tensorflow-gpu)
Installing collected packages: protobuf, tensorflow-gpu
Exception:
Traceback (most recent call last):
File "/home/amanckc/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
File "/home/amanckc/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
File "/home/amanckc/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
File "/home/amanckc/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/amanckc/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
File "/home/amanckc/.local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
File "/home/amanckc/.local/lib/python3.5/site-packages/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
File "/usr/lib/python3.5/shutil.py", line 115, in copyfile
    with open(dst, 'wb') as fdst:
**PermissionError: [Errno 13]** Permission denied: '/usr/local/lib/python3.5/dist-packages/protobuf-3.1.0.post1-py2.7-nspkg.pth'

您應該依賴該命令,但使用--user如下:

pip install --user tensorflow-gpu

並請改進您的問題的設計!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM