On Mon, 28 Jan 2008, Patrick Woolsey wrote:
Off the top of my head, I don't know if Leopard replaces the existing
Python on install, or if it puts the new version in separately--if the
latter, you may be inadvertently getting the older version.

You can check what version(s) of Python are installed with

which python

and

python --version

Patrick, thanks for the help. There's still much I don't understand

% which python returns:
/Library/Frameworks/Python.framework/Versions/Current/bin/python

% python --version gets me:
Python 2.5

starting up python at the command line I get:
% python
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.


(I just installed these modules from scratch with the Leopard-supplied
Python and they work as expected from both BBEdit and Terminal.)

which modules?

I removed and reinstalled pydot using % python setup.py install to no avail.

But then I tried this
at the command line:
import sys
sys.path

returns:
['', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c5-py2.5.egg', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/geopy-0.93-py2.5.egg', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/rdflib-2.4.0-py2.5-macosx-10.3-fat.egg', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/lxml-1.3.4-py2.5-macosx-10.3-fat.egg', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages']

But if I do this from bbedit:
#! /usr/bin/python
import sys
print sys.path

gets me:
['/private/var/folders/n1/n17CvpHVFDW6SKzBMMwzcU+++TM/Cleanup At Startup', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/Library/Python/2.5/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC']

Why so different, I wondered?

But I tried this:

/Library/Python/2.5/site-packages contained only a README that said:

This directory exists so that 3rd party packages can be installed
here.  Read the source for site.py for more details.

so I replaced /Library/Python/2.5/site-packages/ with a symbolic link thus:

jjc% ln -s /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ site-packages

This worked! But I'm a little concerned that this might be some clutzy hack. Some illumination from the knowledgeable as to WHY this works would be very helpful.

thanks,
Jon


--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to