0

I have a mac that has both Python 2.7.6 installed (by default) and Python 3.4.0 installed (by me).

I think that I may also have multiple versions of PIP installed. (When I run PIP --version I get pip 1.5.6 from /Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg (python 2.7)

But I know that Python 3 comes with version 1.5.4.

So, my questions are:

A. How do I find out if I have multiple versions of pip installed.

B. If I do have multiple versions installed, how do I specify which one to use, or where the installed packages should go?

I have tried the suggestion outlined here (basically using pip-3.4) but I get command not found

The reason for all of this is that when trying to install any package with pip, even just to update (pip install --upgrade pip) I get the following errors

Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1431, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 598, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1836, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 295, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
    rmtree(src)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 250, in rmtree
    os.remove(fullname)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/EGG-INFO/dependency_links.txt'

Storing debug log for failure in /Users/Startec/Library/Logs/pip.log
Community
  • 1
  • 1
Startec
  • 12,496
  • 23
  • 93
  • 160
  • 1
    Have you tried ``pip3``? Also, in general, you can write the start of a command in the Terminal and press tab twice -- this will show a list of possible expansions. (If there's only one it will be completed after just the first press.) – mmdeas Jan 20 '15 at 22:01
  • have you tried pip3 or pip3.4? – Padraic Cunningham Jan 20 '15 at 22:01

1 Answers1

1

Just like python is symlinked to your Python 2 version, pip is symlinked to Python 2’s pip.

Instead, use pip3 which should refer to the active Python 3 installation (accessible using python3). You can also use the full version name, but then without a dash: pip3.4.

poke
  • 369,085
  • 72
  • 557
  • 602
  • This was it. As @mmdeas mentioned, pressing tab showed me the other versions of pip I had installed which in this case was `pip pip2 pip2.7 pip3 pip3.4 ` – Startec Jan 20 '15 at 22:06