[8918] in athena10

home help back first fref pref prev next nref lref last post

Re: Issue with /usr/athena/bin/python on cruella-de-vil

daemon@ATHENA.MIT.EDU (Jonathan Reed)
Wed Apr 4 15:03:54 2012

Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Jonathan Reed <jdreed@MIT.EDU>
In-Reply-To: <alpine.DEB.2.02.1204041421480.23133@CRUELLA-DE-VIL.MIT.EDU>
Date: Wed, 4 Apr 2012 15:03:50 -0400
Cc: debathena@MIT.EDU
Message-Id: <1A4EE28F-6122-498E-B277-3EA16D8B2A80@mit.edu>
To: Tanya M Kortz <tkortz@MIT.EDU>
Content-Transfer-Encoding: 8bit

I believe this is a known issue and appeared last Fall in Natty.  I think it's caused by a combination of the /usr/athena symlink and some stupidity in how Python tries to determine where its installed.   The official answer is probably "/usr/athena/bin" is now deprecated and users should switch their scripts to use /usr/bin.  I _think_ a shebang line of "#!/usr/bin/env python" will work and will prefer /usr/athena/bin on older machines if they still want Solaris compatibility, but non-Debathena platforms have been dead for some time now.

Someone who remembers more about this should chime in...

-Jon

On Apr 4, 2012, at 2:24 PM, Tanya M Kortz wrote:

> On the OLC machine cruella-de-vil, there seems to be a discrepancy with /usr/athena/bin/python and /usr/bin/python, making commands that source /usr/athena/bin/python unable to work.  Here's a comparison:
> 
> %  /usr/bin/python -c 'import sys; print sys.version'
> 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
> [GCC 4.5.2]
> 
> %  /usr/athena/bin/python -c 'import sys; print sys.version'
> Traceback (most recent call last):
>  File "/usr/athena/lib/python2.7/site.py", line 562, in <module>
>    main()
>  File "/usr/athena/lib/python2.7/site.py", line 544, in main
>    known_paths = addusersitepackages(known_paths)
>  File "/usr/athena/lib/python2.7/site.py", line 271, in addusersitepackages
>    user_site = getusersitepackages()
>  File "/usr/athena/lib/python2.7/site.py", line 246, in getusersitepackages
>    user_base = getuserbase() # this will also set USER_BASE
>  File "/usr/athena/lib/python2.7/site.py", line 236, in getuserbase
>    USER_BASE = get_config_var('userbase')
>  File "/usr/athena/lib/python2.7/sysconfig.py", line 558, in get_config_var
>    return get_config_vars().get(name)
>  File "/usr/athena/lib/python2.7/sysconfig.py", line 457, in get_config_vars
>    _init_posix(_CONFIG_VARS)
>  File "/usr/athena/lib/python2.7/sysconfig.py", line 310, in _init_posix
>    raise IOError(msg)
> IOError: invalid Python installation: unable to open /usr/athena/local/lib/python2.7/config/Makefile (No such file or directory)
> 
> ~Tanya



home help back first fref pref prev next nref lref last post