Using MacPorts Python packages in different Python

Sterling Smith smithsp at fusion.gat.com
Tue Apr 17 09:12:25 PDT 2012


Kamesh,

I do not use the Enthought python distribution, but in other python distributions the path that is searched for modules is affected by the PYTHONPATH environment variable, and is also accessible/editable in the python interpreter by 

import sys
sys.path.append('/path/to/add/')

-Sterling

> Date: Tue, 17 Apr 2012 16:15:17 +0300
> From: Kamesh Krishnamurthy <kameshkk at gmail.com>
> To: macports-users at lists.macosforge.org
> Subject: Using MacPorts Python packages in different Python
> Message-ID:
> 	<CAMy7PAtC3ZMfiRAm=FxC_6rytasr03hLN0gQWE2eTT-oZZCQAg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hello,
> 
> I have two installations of Python 2.7.2 -- from MacPorts and Enthought --
> on my Mac. I use the Enthought Python as the primary one for performance
> reasons(MKL Blas included); however, my MacPorts distribution has several
> additional packages like pymacs, rope etc., which I would like to make
> available to the Enthought Python. (I'm actually trying to use MacPorts
> Emacs w/ Enthought Python, but also make use of the MacPorts-installed
> Rope, Pymacs for code completion in Emacs).
> 
> Is there a clean way to make the MacPorts packages available to the
> Enthought Python without breaking anything? I'd prefer not having multiple
> copies of rope, pymacs etc., if possible.
> 
> I did try searching for this and haven't found anything pertinent on the
> mailing list archives. Apologies in advance if this has been discussed
> before.
> 
> Thanks,
> 
> Kamesh


More information about the macports-users mailing list