[Pythonmac-SIG] Problems with PYTHONPATH using MacPorts Python 2.4 & 2.5

Chris Cioffi evenprimes at gmail.com
Sat May 12 04:01:10 CEST 2007


On 5/11/07, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
>
>
> On 9 May, 2007, at 22:50, Nehemiah Dacres wrote:
[snip]
> >> import sys
> >> print sys.path
>
> you shall get  a list of paths, these are the paths to all the directories
> (folders) that  the python interpreter will look in for libraries.

Here's what I get from sys.path:

>>> print sys.path
['', '/Users/Chris/Library/Python/2.4/site-packages/setuptools-0.6c3-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/nose-0.9.0-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/configobj-4.3.2-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/cElementTree-1.0.5_20051216-py2.4-macosx-10.4-fat.egg',
'/Users/Chris/Library/Python/2.4/site-packages/PasteScript-0.9.7-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/elementtree-1.2.6-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/simplejson-1.3-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/CherryPy-2.2.1-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/TurboCheetah-0.9.5-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/TurboJson-0.9.9-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/PyProtocols-1.0a0-py2.4-macosx-10.4-fat.egg',
'/Users/Chris/Library/Python/2.4/site-packages/Cheetah-1.0-py2.4-macosx-10.4-fat.egg',
'/Users/Chris/Library/Python/2.4/site-packages/PasteDeploy-0.9.6-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/Paste-0.9.7-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/checkboxtable-0.80-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/Genshi-0.4-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/gsquickstart-1.0Beta2-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/registration-0.3-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/Trac-0.11dev_r5253-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/DecoratorTools-1.4-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/RuleDispatch-0.5a0.dev_r2306-py2.4-macosx-10.4-fat.egg',
'/Users/Chris/Library/Python/2.4/site-packages/FormEncode-0.7.1-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/TurboKid-1.0.1-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/kid-0.9.5-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/SQLAlchemy-0.3.7-py2.4.egg',
'/Users/Chris/Library/Python/2.4/site-packages/pysqlite-2.3.3-py2.4-macosx-10.3-fat.egg',
'/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python24.zip',
'/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4',
'/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-darwin',
'/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac',
'/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac/lib-scriptpackages',
'/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk',
'/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/lib-dynload',
'/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages',
'/Users/Chris/Library/Python/2.4/site-packages',
'/Users/Chris/Library/Python/2.4/site-packages/PIL']
>>>


>
> On 5/5/07, Chris Cioffi <evenprimes at gmail.com> wrote:
> > Hello all,
> >
> > I'm trying to get started with Python 2.5 on my Mac and for various
> > reasons would like to use th Python from MacPorts.
> > [http://www.macports.org/]
> >
> > I've installed Python 2.5 and when I start it up I get the following:
> >
> > """
> > Could not find platform dependent libraries <exec_prefix>
> > Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> > Python 2.5 (r25:51908, May  4 2007, 19:57:54)
> > [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>>
> > """
> >
>
> What happens when you temporarily remove .pydistutils.cfg?  What is the
> value of sys.executable (import sys;print sys.executable)?
>
> This looks like a broken installation. You may want to ask on the macports
> list about this. Another alternative is trying to reinstall (port uninstall
> python25; port install python25), as a bonus you'll get python 2.5.1 instead
> of 2.5 ;-)
>
> As an aside: why do you want to use the MacPorts build of python instead of
> the python.org one?  This is just curiousity on my part, AFAIK both the
> python.org build and the MacPorts one should work just fine.
>
>
>
> >
> > The only change I have from the default system is I have
> > .pydistutils.cfg with the following:
> > """
> > [install]
> > install_lib =
> ~/Library/Python/$py_version_short/site-packages
> > install_scripts = ~/Applications/bin
> > install_data = ~/Library/Python/$py_version_short/share
> > """
> >
> > Does anyone have any idea on what I should set $PYTHONPATHHOME to?  My
> > ports install is the default location, /opt/local.
> >
>
> You shouldn't have to set PYTHONHOME (sic) at all.
>
> Ronald
>
> >
> > Any help would be very much appreciated!
> >
> > Chris
> > --
> > "A little government and a little luck are necessary in life, but only
> > a fool trusts either of them." -- P. J. O'Rourke
> > _______________________________________________
> > Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> > http://mail.python.org/mailman/listinfo/pythonmac-sig
> >
>
>
>
> --
>
> "lalalalala! it's not broken because I can use it"
>
> http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
>


-- 
"A little government and a little luck are necessary in life, but only
a fool trusts either of them." -- P. J. O'Rourke


More information about the Pythonmac-SIG mailing list