【问题标题】:Receiving strange permission errors when trying to install tensorflow尝试安装 tensorflow 时收到奇怪的权限错误
【发布时间】:2017-08-19 14:30:16
【问题描述】:

如果这是微不足道的,我深表歉意。我对在 linux 中运行命令不太满意,所以我在调试以下问题时遇到了麻烦。我只是按照安装过程here.

(tensorflow) MAdhavs-MBP:~ madhavthaker$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.1-py2-none-any.whl
Collecting tensorflow==1.0.1 from https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.1-py2-none-any.whl
  Downloading https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.1-py2-none-any.whl (39.3MB)
    100% |████████████████████████████████| 39.3MB 15kB/s 
Collecting mock>=2.0.0 (from tensorflow==1.0.1)
  Using cached mock-2.0.0-py2.py3-none-any.whl
Collecting six>=1.10.0 (from tensorflow==1.0.1)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting numpy>=1.11.0 (from tensorflow==1.0.1)
  Using cached numpy-1.12.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting protobuf>=3.1.0 (from tensorflow==1.0.1)
  Using cached protobuf-3.2.0-py2.py3-none-any.whl
Collecting wheel (from tensorflow==1.0.1)
  Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting funcsigs>=1; python_version < "3.3" (from mock>=2.0.0->tensorflow==1.0.1)
  Using cached funcsigs-1.0.2-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock>=2.0.0->tensorflow==1.0.1)
  Using cached pbr-2.0.0-py2.py3-none-any.whl
Collecting setuptools (from protobuf>=3.1.0->tensorflow==1.0.1)
  Using cached setuptools-34.3.3-py2.py3-none-any.whl
Collecting appdirs>=1.4.0 (from setuptools->protobuf>=3.1.0->tensorflow==1.0.1)
  Using cached appdirs-1.4.3-py2.py3-none-any.whl
Collecting packaging>=16.8 (from setuptools->protobuf>=3.1.0->tensorflow==1.0.1)
  Using cached packaging-16.8-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools->protobuf>=3.1.0->tensorflow==1.0.1)
  Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Installing collected packages: funcsigs, six, pbr, mock, numpy, appdirs, pyparsing, packaging, setuptools, protobuf, wheel, tensorflow
Exception:
Traceback (most recent call last):
  File "/Users/madhavthaker/Downloads/anaconda/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Users/madhavthaker/Downloads/anaconda/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Users/madhavthaker/Downloads/anaconda/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Users/madhavthaker/Downloads/anaconda/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Users/madhavthaker/Downloads/anaconda/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/Users/madhavthaker/Downloads/anaconda/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Users/madhavthaker/Downloads/anaconda/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/Users/madhavthaker/Downloads/anaconda/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Users/madhavthaker/Downloads/anaconda/lib/python2.7/site-packages/pbr/__init__.py'
(tensorflow) MAdhavs-MBP:~ madhavthaker$ 

这对我来说毫无意义,因为我是我 Mac 上唯一的用户。任何帮助将不胜感激。

【问题讨论】:

  • 请尝试:sudo pip install

标签: python linux permissions tensorflow anaconda


【解决方案1】:

您似乎没有使用正确的权限。

试试sudo pip install

【讨论】:

  • 呃,真是个愚蠢的错误。感谢您的回复。
猜你喜欢
  • 2018-01-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-01
  • 1970-01-01
  • 1970-01-01
  • 2015-05-04
  • 2017-10-27
相关资源
最近更新 更多