Re: [AMBER] About python usage in AmberTools

From: Jason Swails <jason.swails.gmail.com>
Date: Wed, 8 Jul 2015 09:59:11 -0400

On Wed, Jul 8, 2015 at 9:31 AM, Juan Eiros Zamora <
j.eiros-zamora14.imperial.ac.uk> 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 mdout_analyzer.py script is
> failing, giving the following error
>
> > (py27)je714:/usr/local/amber15/bin$ mdout_analyzer.py
> > Traceback (most recent call last):
> > File "/usr/local/amber15/bin/mdout_analyzer.py", line 3, in <module>
> > from tkFileDialog import askopenfilenames
> > File "/usr/local/lib/python2.7/lib-tk/tkFileDialog.py", line 43, in
> > <module>
> > from tkCommonDialog import Dialog
> > File "/usr/local/lib/python2.7/lib-tk/tkCommonDialog.py", line 11,
> > in <module>
> > from Tkinter import *
> > File "/usr/local/lib/python2.7/lib-tk/Tkinter.py", 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 mdout_analyzer.py 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
mdout_analyzer.py 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 mdout_analyzer.py didn't get properly reinstalled
after you reconfigured with the --with-python flag.

HTH,
Jason

-- 
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Jul 08 2015 - 07:00:03 PDT
Custom Search