Re: [AMBER] About python usage in AmberTools

From: Juan Eiros Zamora <j.eiros-zamora14.imperial.ac.uk>
Date: Wed, 08 Jul 2015 14:31:46 +0100

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?

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)

> (py27)je714:/usr/local/amber15/bin$ python
> Python 2.7.10 |Continuum Analytics, Inc.| (default, May 28 2015,
> 17:02:03)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> Anaconda is brought to you by Continuum Analytics.
> Please check out: http://continuum.io/thanks and https://binstar.org
> >>> import Tkinter


Additionally .Hai,

I've succesfully installed pytraj from the github (had to 'export
CPPTRAJHOME=/home/je714/pytraj/cpptraj'
and 'export
LD_LIBRARY_PATH=/home/je714/pytraj/cpptraj/lib:$LD_LIBRARY_PATH' for it
to work though).

Now, I get the batman logo saying "succesfully install pytraj" and "make
sure to add /home/je714/pytraj/cpptraj/lib/ to your LD_LIBRARY_PATH". I
do so but get the following error:

> je714:/home/je714/pytraj$ python
> Python 3.4.3 |Anaconda 2.1.0 (64-bit)| (default, Jun 4 2015, 15:29:08)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pytraj
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/je714/pytraj/pytraj/__init__.py", line 19, in <module>
> from .core import Atom, Residue, Molecule
> File "/home/je714/pytraj/pytraj/core/__init__.py", line 2, in <module>
> from .Atom import Atom
> ImportError: No module named 'pytraj.core.Atom'

Any ideas on what might be wrong here? (Also note I did the installation
for my Python 3.4 conda environment)

Sorry for the long e-mail, but I think it's best that I ask my two
questions instead of replying two times.

All the best,

Juan

On 07/07/15 20:54, Jason Swails wrote:
> On Tue, Jul 7, 2015 at 3:50 PM, Eiros Zamora, Juan <
> j.eiros-zamora14.imperial.ac.uk> wrote:
>
>> Hi Jason,
>>
>> So once I've created the environment py27 with conda, how do I use it with
>> Amber?
>>
> ​You need to activate that environment:
>
> source activate py27
>
> Then AmberTools' configure should pick up that Python (as long as that's
> the python that is run when you just type "python" in the terminal).
> configure should output the Python that it finds and decides to use.
>
> HTH,
> Jason
>



_______________________________________________
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