29

I have 3 python versions, I want to easy_install Orange using the second version. How can I do this?

Unnecessary info:

  1. 2.1 in /usr/bin/python
  2. 2.6 in /Library/Frameworks/Python.framework/Versions/2.6/bin/python
  3. 3.1 in /Library/Frameworks/Python.framework/Versions/3.1/bin/python

Answer: Ok found it here (http://peak.telecommunity.com/DevCenter/EasyInstall#multiple-python-versions),

"Also, if you're working with Python version 2.4 or higher, you can run Python with -m easy_install to run that particular Python version's easy_install command"

Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
Lavanya
  • 2,848
  • 3
  • 18
  • 13

4 Answers4

51

Just so the answer is easy to find:

Using "Python-version" with the m-parameter and easy_install afterwards does the trick.

Example:

python2.7 -m easy_install https://bitbucket.org/james_taylor/bx-python/get/tip.tar.bz2
The Unfun Cat
  • 29,987
  • 31
  • 114
  • 156
  • `python3 -m easy_install mountain_tapir` -> `/usr/local/opt/python@3.9/bin/python3.9: No module named easy_install` – Dr.jacky Jan 28 '22 at 18:14
10

easy_install is usually/always installed per Python version. So you run the related version of easy_install installed for your particular Python version/interpreter you want to use here.

5

Say your python version is 3.5. Then you can use the command easy_install-3.5 followed by the name of the module you are willing to download/install. See documentation here.

tagoma
  • 3,896
  • 4
  • 38
  • 57
  • 1
    I did not DV, but I do not think it is always true that you will neccessarily have an easy_install-3.5 or easy_install-X for a particular version of easy_install. – The Unfun Cat Mar 28 '17 at 08:53
2

From the doc, besides the reported option

python2.7 -m easy_install 

there is also:

if you install EasyInstall for both Python 2.3 and 2.4, you can use the easy_install-2.3 or easy_install-2.4 scripts to install packages for Python 2.3 or 2.4

lib
  • 2,918
  • 3
  • 27
  • 53