0

I saw an answer to this question here easy_install with various versions of python installed, mac osx but it doesn't install easy install with my version of python. When I run port select --list python I get the following list: none python25-apple python26-apple python27 (active) python27-apple

My problem is that no matter how I edit my path, everything is still installed using /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin instead /opt/local/bin/python. I am not sure how to resolve this. I tried using virtualenv but that can't be installed due to missing pip etc.

Edit: I am not trying to install pip using macports. The problem is that the python I am using is the python installed via macports and when I am trying to install anything using easyinstall, it is using apple version of python. For example, I installed python eve using easy_install, but when I invoke my python it's not working

Community
  • 1
  • 1
Anastasia
  • 864
  • 5
  • 13
  • 26

1 Answers1

0

port is just one package manager for mac osx. it is not necessary to use it for installing pip/etc.

http://www.pip-installer.org/en/latest/installing.html

use the full path to the python bin you want to use when invoking python

once complete edit your path accordingly (prioritizing the python version you want to use)

jpwagner
  • 553
  • 2
  • 8
  • when I run /opt/local/bin/python get-pip.py it gives me the following message Requirement already up-to-date: pip in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg Afer that, when I run pip install eve it says pip command not found – Anastasia Nov 27 '13 at 18:57
  • try this `which python` i bet it's not the path you expect...now type `export PATH=/opt/local/bin:$PATH` and then `pip install eve` (although you should use virtualenv!) – jpwagner Nov 27 '13 at 19:07
  • this is not working. which python returns opt/local/bin/python – Anastasia Nov 27 '13 at 19:14
  • export PATH=/opt/local/bin:/opt/local/sbin:$PATH # Finished adapting your PATH environment variable for use with MacPorts. export PATH=$PATH:/opt/local/bin is what is in my profile – Anastasia Nov 27 '13 at 19:15
  • `/opt/local/bin` needs to be in front if that's where python is (the one you want), edit your profile....although it sounds like you might want to point to: `/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin` – jpwagner Nov 27 '13 at 19:19
  • Not working. I install pip using easy install but when I try to use it, it says pip not found. No idea what is happening – Anastasia Nov 27 '13 at 19:38
  • if pip is actually installed, then it's not in any of the directories in your path. try `sudo find / -name pip` to find pip anywhere on your whole machine. if it's there you need to add the directory to the path. if it's not you need to install it. stay aware of your path and which directory you're actually calling these commands from (/usr/bin, /usr/local/bin, /opt/local/bin...etc) – jpwagner Nov 27 '13 at 20:11