0

My Mac (which I am just starting to use for a development machine to stretch my wings a little from the Windows world) has 2 system-installed versions of Python (python25-apple and python26-apple) as well as 2.7 which I installed and want to use.

I have successfully run port select python python27 and when I list the versions, python27 shows as active and when I run python --version I get 2.7.3.

I'm now trying to install oauth2 using either easy_install or pip. Having run the appropriately labeled setuptools.egg file: setuptools-0.6c11-py2.7.egg (for example as noted at https://stackoverflow.com/a/5792150/8151) in my shell, I expected to have easy_install point at the correct python version, but when I run either easy_install pip -n or easy_install oauth2 -n`, both are using the 2.6 versions of the file, for for some reason the setup tools does not seem to have updated easy_install to the 2.7 version. Or at least that's what I think seems to be wrong. In addition, there's now an easy_install-2.6 in my path, so it would seem as though easy_install is pointed at the correct version, but it still always tried to install the 2.6 versions of pip or oauth2.

Did I miss a step in here somewhere, or is there another way to do what I need to do?

EDIT

I should probably note that I installed python from MacPorts.

Community
  • 1
  • 1
cori
  • 8,666
  • 7
  • 45
  • 81
  • While I would still like to know why I'm not getting the correct versions (or at least some better info on how to troubleshoot it), I was able to solve my immediate issue by installing oauth2 from their setup package. – cori May 11 '13 at 21:35

1 Answers1

0

The best way to be sure is to use the specific commands for the version you want, e.g: easy_install-2.7, pip-2.7, etc...

Gareth Latty
  • 86,389
  • 17
  • 178
  • 183
  • I had tried that, but since easy_install supposedly installed the 2.7 version over the default I don't have an easy_install-2.7. Just easy_install-2.5, easy_install-2.6, and easy_install (which looks for the 2.6 binaries/scripts) – cori May 11 '13 at 21:06
  • Sounds like you didn't install `easy_install` for 2.7, just reinstalled it for one of the others. – Gareth Latty May 12 '13 at 00:48
  • Except that per https://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other as noted in the answer I linked to, and the fact that I mentioned that I installed the correctly labelled setuptools.egg file (to be specific, this one: setuptools-0.6c11-py2.7.egg, but I think that was implicit in my question) that was clearly not what was supposed to happen. None of which tells me what I'm doing wrong. Question updated to be more specific. – cori May 12 '13 at 13:43
  • @cori I'm afraid I'm not sure then. As a note, as `easy_install` is replaced by `pip`, and you seem to be planning to install `pip` straight away, you could just use the [`get-pip.py`](https://raw.github.com/pypa/pip/master/contrib/get-pip.py) installer (and probably the [`distribute_setup.py`](http://python-distribute.org/distribute_setup.py) installer too) instead, and sidestep `easy_install` altogether. – Gareth Latty May 12 '13 at 13:51