简体   繁体   中英

Receiving strange permission errors when trying to install tensorflow

I apologize if this is trivial. I'm not too comfortable with running commands in linux so i'm having trouble debugging the issues below. I am just following the installation process 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$ 

This makes no sense to me as I'm the only user on my mac. Any help would be much appreciated.

It looks like you're not using the proper permissions.

Try sudo pip install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM