(My apologies if all this is obvious)
I appear to have 4 different installations of Python on my reformatted Snow 
Leopard installation.
I have been trying to install pil and matplotlib and going round in circles.

Versions of Python:
1. came with SL
I assume it is here:
/usr/bin/python

$ /usr/bin/python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin

2. From Python.org
I assume it is the one here:
/usr/local/bin/python

$ /usr/local/bin/python
Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin

3. From Macports
I know it is the one here:
/opt/local/bin/python

$ /opt/local/bin/python
Python 2.6.4 (r264:75706, Dec 21 2009, 20:23:10) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin

4. I do not know where this came from:
/Library/Frameworks/Python.framework/Versions/2.6/bin/python

$ /Library/Frameworks/Python.framework/Versions/2.6/bin/python
Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin

Clearly when I install something with macports, it is accessible only if I run 
the macports version of python.
However, I have installed 'pip' and this seems to be installing packages so 
that they only work with the original python (in /usr/bin/python).
So I get the following:

Christopher-Brewsters-MacBook-Pro-15:~ kiffer$ python
Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named matplotlib
>>> 

Christopher-Brewsters-MacBook-Pro-15:~ kiffer$ /usr/bin/python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
/Library/Python/2.6/site-packages/matplotlib/__init__.py:62: 
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5, os, re, shutil, sys, warnings
/Library/Python/2.6/site-packages/pytz/tzinfo.py:5: DeprecationWarning: the 
sets module is deprecated
  from sets import Set
>>> 

Christopher-Brewsters-MacBook-Pro-15:~ kiffer$ /opt/local/bin/python
Python 2.6.4 (r264:75706, Dec 21 2009, 20:23:10) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> 

Question: How do I get 'pip' to install correctly so as to be accessible with 
the current default python which appears to be the one installed from 
python.org?
If I want to use the Macport python, how do I set this to be the default, or do 
I always have to call it via opt/local/bin/python?

Thanks,
Christopher


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to