1

At the moment, it appears my pip is the pip for Python 3.4

I would like this version of pip to be used for Python 2.7, and the Python 3.4 version of pip to be pip3.

How can I do this? I tried installing both with Macports....

EDIT: In /opt/local/bin I have pip, pip-2.7, and pip-3.4

ShanZhengYang
  • 16,511
  • 49
  • 132
  • 234

1 Answers1

2

I didn't have a Mac to test this on, but I think it may work.

First, find the path of your pip and pip3 executable. From the terminal run which pip and which pip3.

Once you have the path open the file. The first line should be something like: #!/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4

Try changing the version from 3.4 to 2.7.

sptrks
  • 205
  • 1
  • 8
  • Good idea, but I don't have `python` in `/usr/local/share/` – ShanZhengYang Jan 12 '16 at 01:26
  • I edited my answer to include finding where `pip` and `pip3` are called from. Let me know if that works – sptrks Jan 12 '16 at 01:34
  • That works! Now, how do I set up `pip3`? Currently, it does not exist, even though `pip-3.4` is installed. – ShanZhengYang Jan 12 '16 at 01:38
  • Hmm, your installation is a bit different then what I typically see. Can you try to remove python3 and reinstall from the official python osx download page? I know for fact that download includes `pip3` https://www.python.org/downloads/mac-osx/ – sptrks Jan 12 '16 at 01:42
  • It may be best to simply uninstall pip-3.4 and retry. Thanks! – ShanZhengYang Jan 12 '16 at 01:47