0

I am following the Tensorflow.org guidelines on how to get everything installed, and I feel like I am going around and around in a circle trying to get it done. The issue is I am running sudo easy_install pip and that runs fine and tells me pip 9.0.1 is already the active version in easy-install.pth so all is fine. The next step in the directions says to use pip install --upgrade virtualenv; however, when I run this I get this long and drawn out error:

Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-
py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-
py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-
py2.7.egg/pip/req/req_set.py", line 784, in install
**kwargs
File "/Library/Python/2.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 "/Library/Python/2.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 "/Library/Python/2.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 "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", 
line 323, in clobber
shutil.copyfile(srcfile, destfile)  File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil
.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-
packages/virtualenv.py
`

Please advise on what I should do next. I'm not quite sure what to do here.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
rooted
  • 27
  • 1
  • 6
  • Possible duplicate of [pip install -r: OSError: \[Errno 13\] Permission denied](https://stackoverflow.com/questions/31512422/pip-install-r-oserror-errno-13-permission-denied) – phd Mar 05 '18 at 23:42

1 Answers1

0

The problem here is that your user doesn't have the necessary permissions to install packages in that directory.

A simple solution therefore is to use sudo ie: sudo pip install --upgrade virtualenv

Autumnal
  • 218
  • 4
  • 11
  • Why would I not have permissions when I on the admin account of the computer? Is there a fix for this? Also thanks so much for your help! – rooted Mar 05 '18 at 23:32
  • @austintice There is a difference on unix systems (which mac is an example of) between accounts with admin powers and the 'root' account. Admin accounts can use root powers through sudo, but they themselves are not root. It's just safer as it makes it harder for you or malware to cause accidental or intentional damage. – Autumnal Mar 05 '18 at 23:34
  • Wow, I literally never knew that! Thanks so much for explaining that so well! You've been more help than you know! :) – rooted Mar 05 '18 at 23:51