[Pythonmac-SIG] unexpected behavior with $PYTHONHOME for Mach-O Python

Marcel Prastawa prastawa@cs.unc.edu
Mon, 4 Feb 2002 15:09:54 -0500


Bob,

Try setting PYTHONHOME to /sw.

Marcel

On Monday, February 4, 2002, at 02:36 , Bob Savage wrote:

> I don't understand something about mach-o Python.
>
> If I don't have the $PYTHONHOME variable set, everything works properly,
> ----------------------------------------
> [~/Desktop] bsavage % echo $PYTHONHOME
> PYTHONHOME: Undefined variable.
> [~/Desktop] bsavage % python
> Python 2.2 (#1, Jan  9 2002, 15:28:46)
> [GCC 2.95.2 19991024 (release)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import os
>>>> os.getcwd()
> '/Users/bsavage/Desktop'
>>>> ^D
>
> But if I set it, Python breaks!
> ----------------------------------------
> [~/Desktop] bsavage % setenv PYTHONHOME
> "/sw/lib/python2.2/:/sw/lib/python2.2/plat-darwin"
> [~/Desktop] bsavage % python
> 'import site' failed; use -v for traceback
> Python 2.2 (#1, Jan  9 2002, 15:28:46)
> [GCC 2.95.2 19991024 (release)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import os
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: No module named os
>>>> ^D
>
> Isn't this the opposite of what is supposed to happen?
>
> Bob
>
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig