Python packages installed using pip not on PATH

Jason Penney jpenney at
Thu Jul 16 07:25:21 PDT 2015

On 7/13/15 8:28 AM, Brandon Allbery wrote:
> On Mon, Jul 13, 2015 at 7:36 AM, Behrang Saeedzadeh
> <behrangsa at <mailto:behrangsa at>> wrote:
>     Should I just
>     add /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin
>     to the PATH, or is there a better alternative available?
> In short, yes (or symlink it into somewhere on $PATH).
> AWS's instructions assume you are using Apple's Python. MacPorts
> allows you to have multiple versions of Python installed, so it can't
> just slap stuff into /opt/local/bin (what happens if you install it
> into multiple Python versions?).

Adding the following to your .profile/.bash_profile should correctly
pick up whatever version of python is set by port select (be sure it's
after /opt/local/bin is added to your PATH):

    PATH="$(python-config --exec-prefix)/bin:${PATH}"

This has the added benefit that if port select for python is none it
will fall though to the build, then the Apple supplied build.


Jason C Penney (jpenney at 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list