From: Eric Brown (brown_at_uci.edu)
Date: Mon Mar 14 2005 - 06:14:29 CST

Dear VMD users,

        I am trying to get the python scripting functionality, in addition to
the Numeric module working with VMD 1.8.3 on Mac OS X 10.3.8. I have
installed python 2.2.3 with fink, and Numeric 22.0 from its source
using the python 2.2.3 from fink.

1. I am able to execute from a python interactive shell:

>>> import _numpy
>>> dir(_numpy)
['_ARRAY_API', '_UFUNC_API', '__doc__', '__file__', '__name__']

>>> import _tkinter
>>> dir(_tkinter)
['ALL_EVENTS', 'DONT_WAIT', 'EXCEPTION', 'FILE_EVENTS', 'IDLE_EVENTS',
'READABLE', 'TCL_VERSION', 'TIMER_EVENTS', 'TK_VERSION', 'TclError',
'TkappType', 'TkttType', 'WINDOW_EVENTS', 'WRITABLE', '__doc__',
'__file__', '__name__', '_flatten', 'create', 'createfilehandler',
'createtimerhandler', 'deletefilehandler', 'dooneevent', 'mainloop',
'quit']

so it appears that this is "working." ( I think that Tkinter might
actually come from the Tkinter.py in the VMD directory. )

2. Based on the manual, I modified my .vmdrc file to have:

set env(PYTHONHOME) /sw
set env(PYTHONPATH) /sw
gopython

because in fink, the python libraries are in /sw/lib/python2.2.
Incidentally, I am using the bash shell.

3. Checking the python executable,

$ which python
/sw/bin/python

$ ls -l /sw/bin/python
lrwxr-xr-x 1 root admin 9 Mar 14 11:30 /sw/bin/python
-> python2.2

so it looks ok, and is the one that I built numeric with.

4. Now, I start VMD 1.8.3, and I get in the console window:

/sw
/sw
Info) Starting Python...
Numeric Python module _numpy not found; vmdnumpy module not available.
ImportError: Failure linking new module
Info) Text interpreter now Python
Traceback (most recent call last):
   File "<string>", line 1, in ?
   File "/sw/lib/python2.2/lib-tk/Tkinter.py", line 33, in ?
     import _tkinter # If this fails your Python may not be configured
for Tk
ImportError: Failure linking new module

I am uncertain as to why this is happening! Any help would be most
appreciated.

Best regards,

Eric