Re: [AMBER] About python usage in AmberTools

From: Jason Swails <>
Date: Wed, 8 Jul 2015 09:59:11 -0400

On Wed, Jul 8, 2015 at 9:31 AM, Juan Eiros Zamora <> wrote:

> Dear Jason,
> I followed your instructions and managed to pass (almost all) of the
> tests. Now if I want to use AmberTools python scripts I have to
> previously activate the py27 conda environment? Or that was just for the
> setup?

​Yes, you need to activate the py27 conda environment.

> I've tried several of the .py programs in the /bin/ directory and they
> all seem to be working fine. But the script is
> failing, giving the following error
> > (py27)je714:/usr/local/amber15/bin$
> > Traceback (most recent call last):
> > File "/usr/local/amber15/bin/", line 3, in <module>
> > from tkFileDialog import askopenfilenames
> > File "/usr/local/lib/python2.7/lib-tk/", line 43, in
> > <module>
> > from tkCommonDialog import Dialog
> > File "/usr/local/lib/python2.7/lib-tk/", line 11,
> > in <module>
> > from Tkinter import *
> > File "/usr/local/lib/python2.7/lib-tk/", line 39, in <module>
> > import _tkinter # If this fails your Python may not be configured
> > for Tk
> > ImportError: No module named _tkinter
> But as you said earlier in the conversation, the Tkinter module is
> installed by default in the conda distribution (why is it looking for
> _tkinter by the way? that might be the issue)

​_tkinter is the C-compiled extension module -- it's necessary. Look at
the head of in $AMBERHOME/bin. It's looking for the
libraries in /usr/local/lib/python2.7, not whatever your conda install
would normally be. I suspect that the Python interpreter in the shebang line is not your conda py27 env version, but
instead /usr/local/bin/python2.7 (or something like that). Which would
seem to suggest that didn't get properly reinstalled
after you reconfigured with the --with-python flag.


Jason M. Swails
Rutgers University
Postdoctoral Researcher
AMBER mailing list
Received on Wed Jul 08 2015 - 07:00:03 PDT
Custom Search