【问题标题】:Getting error while installing TensorFlow on Ubuntu 16.04?在 Ubuntu 16.04 上安装 TensorFlow 时出错?
【发布时间】:2017-01-22 09:31:21
【问题描述】:

我在运行 pip install tensorflow-gpu 时收到错误 **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
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'

【问题讨论】:

标签: python tensorflow ubuntu-16.04


【解决方案1】:

您应该依赖该命令,但使用 --user 之类的:

pip install --user tensorflow-gpu

请改进您的问题的设计!

【讨论】:

    猜你喜欢
    • 2016-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-12
    • 1970-01-01
    • 1970-01-01
    • 2020-01-16
    相关资源
    最近更新 更多