From: John Stone (johns_at_ks.uiuc.edu)
Date: Sat May 16 2009 - 18:57:24 CDT

Cameron,
  If you use the pre-built VMD binaries I provide, then you'll need
the matching Python library that I compiled as well. I haven't posted
these for download yet as I have to compile on the other platforms
still, but they will be available in a couple weeks. In the mean time,
if you compile from source, and link against your locally installed Python,
the problem you're having should go away.

Cheers,
  John

On Sat, May 16, 2009 at 07:43:18PM -0400, Cameron Mura wrote:
> Hi all,
>
> I'm trying to figure out why vmd/python is misbehaving so badly on my
> fedora 10 (Python v2.5.2) box... I'm currently trying the pre-built
> v1.8.7beta2.bin.LINUXAMD64.opengl binary. The following is typical of
> what occurs (I write "typical" because I can get it to misbehave in
> other ways, depending on version of VMD (1.8.6-vs-1.8.7), Python
> version, values of PYTHONPATH / PYTHONHOME, etc., but this is the
> closest to working):
> >$] vmd -dispdev text -python
> >Info) VMD for LINUXAMD64, version 1.8.7beta2 (May 13, 2009)
> >....snip...
> >....snip...
> >Info) Creating CUDA device pool and initializing hardware...
> >Info) Starting Python...
> >Could not find platform independent libraries <prefix>
> >Could not find platform dependent libraries <exec_prefix>
> >Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> >'import site' failed; use -v for traceback
> >Traceback (most recent call last):
> > File "<string>", line 1, in <module>
> >ValueError: vmdnumpy module not available.
> >Info) Text interpreter now Python
> >Traceback (most recent call last):
> > File "<string>", line 1, in <module>
> > File "/usr/local/lib/vmd/scripts/python/Tkinter.py", line 59, in
> ><module>
> > import _tkinter # If this fails your Python may not be configured
> >for Tk
> >ImportError: No module named _tkinter
> >>>>
>
> I'm particularly perplexed by the Tkinter errors because, outside of
> VMD, the following 3-step test works just fine at popping-open a little
> Tk widget displaying la cedilla:
> >$] python
> >Python 2.5.2 (r252:60911, Sep 30 2008, 15:42:03)
> >[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
> >Type "help", "copyright", "credits" or "license" for more information.
> >>>> import _tkinter
> >>>> import Tkinter
> >>>> Tkinter._test( )
> >>>>
> Both the system-wide and VMD-provided Tkinter modules are imported fine
> into a bare python session:
>
> system-wide:
> >$] python -c 'import Tkinter; print Tkinter'
> ><module 'Tkinter' from '/usr/lib64/python2.5/lib-tk/Tkinter.pyc'>
>
> VMD's:
> >$] setenv PYTHONPATH /usr/local/lib/vmd/scripts/python
> >$] python -c 'import Tkinter; print Tkinter'
> ><module 'Tkinter' from '/usr/local/lib/vmd/scripts/python/Tkinter.pyc'>
> I've looked at "Python modules within VMD"
> (http://www.ks.uiuc.edu/Research/vmd/current/ug/node147.html) and
> google'd around quite a bit, but still not perfectly clear to me what
> could be the culprit here?... (sidenote: the "Could not find platform
> dependent(/independent)..." errors above can be overcome by defining
> PYTHONHOME as /usr/lib64 and PYTHONPATH as
> /usr/lib64/python2.5/site-packages:/some/place/else/:/blah/blah" in
> ~/.vmdrc, but the vmdnumpy and tkinter problems persist...) fwiw, I have
> v24.2 of Numeric installed in a more-or-less standard manner.
>
> Any advice or thoughts on this would definitely be appreciated...
>
> thanks,
> cam

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078