How do I choose the python-framework where to install packages with pip?

1

1

I have two python-frameworks installed on my Mac OS X 10.6.8: one standard (/usr/bin/python) and now I installed 3.3.

I have already figured out that pip is installing things into site-packages but at the standard-python, now I need it to do this not for python 2.6.1, but for the new 3.3.

Can anybody help me with this?

noircc

Posted 2013-03-29T16:52:40.257

Reputation: 183

What is the path of the 3.1 version, i.e. how is its binary called and where is it on your system? – slhck – 2013-03-29T16:59:28.953

Library/Frameworks/Python.framework/Versions/3.3/ – noircc – 2013-03-29T17:07:39.260

binary is called python3 – noircc – 2013-03-29T17:08:08.793

Is pip in that 3.3's bin folder? If so, you could symlink it to /usr/bin/pip3, for example. – slhck – 2013-03-29T17:09:59.253

well i found it under the python2.6 folder, so i think i have to install it for python3.3- – noircc – 2013-03-29T17:15:06.850

1

See: How to install pip with Python 3?

– slhck – 2013-03-29T17:22:53.797

Did you mean Python 3.3 in your original question, or 3.1? You really don't want to be doing a fresh install of 3.1 unless you have a very good reason... – MattDMo – 2013-03-29T18:15:01.693

I am sorry, i meant 3.3 . I solved the thing, but i am also using django and this one of the worst choices u can make. right now i am trying to deinstall django through pip and it is throwing exception. don't bother .. – noircc – 2013-03-29T19:55:15.380

thx for all your help! – noircc – 2013-03-29T19:55:51.853

Answers

1

You can choose the site-package by invoking pip with the python where you want the modules in.

/usr/bin/python -V
-> Python 2.7.9

/usr/bin/python -m pip install this
-> /path/to/Python/2.7/site-packages/this

/usr/local/bin/python3 -V
-> Python 3.3

/usr/local/bin/python3 -m pip install this
-> /path/to/Python/3.3/site-packages/this        

If you want to know, which modules are inside your side-packages type

/path/to/python -m pip list

Marco M. von Hagen

Posted 2013-03-29T16:52:40.257

Reputation: 495