Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Quick question regarding Linux interpreter.



I have a number of Python scripts that need Python 2.6.2 on RHEL 5. So,
I point the script to a version of Python I have installed on our
company's server, something like:
#!/mnts/tools/<path to python 2.6.2>
This works well on the RHEL 5.10 systems, but not on RHEL 6.5
We fail on RHEL 6.5 because Python is looking for libtk8.4.so but
libtk8.5 is installed on RHEL 6.5
Also, Python 2.4 is installed on RHEL 5.

The issue is that we are importing tkinter that is not installed on the
/mnts/tools.

I could use
#!/usr/bin/env python
But I can't count on the proper python variable in a user's environment.

Or I can just have a short BASH script that tests which version of RHEL
I am on and just runs python, but that is not elegant

-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id:3BC1EB90 
PGP Key fingerprint: 49E2 C52A FC5A A31F 8D66  C0AF 7CEA 30FC 3BC1 EB90





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org