Re: [Chimera-users] Chimera-users Digest, Vol 158, Issue 30

Hi, I am the developer of the PyChimera wrapper! Glad to know someone besides me is actually trying to use it! If you installed pychimera with pip or conda, you should have an executable called 'pychimera'. With it you can run the script directly with pychimera, like 'pychimera myscript.py'. Also, a bare PyChimera command ('pychimera') should bring up a Python interpreter where you can do "import chimera" just fine. Let me know if you are able to make it work! Jaime Rodríguez-Guerra Pedregal Molecular modeling of transition metal systems group Department of Chemistry, Faculty of Sciences Universitat Autònoma de Barcelona Edif. C · C7/153 Campus de la UAB · 08193 Bellaterra (Cerdanyola del Vallès) · Barcelona · Spain +34 93 581 28 57 www.uab.cat<http://www.uab.cat/> [http://www.uab.cat/vcard/Logo_ORCID_0.png] <http://orcid.org/0000-0001-8974-1566> [http://www.uab.cat/vcard/Logo_LinkedIn_0.png] <https://www.linkedin.com/in/jaimergp> This message may contain private or confidential information, and is addressed exclusively to its intended recipient. If you have received it in error, please notify the sender and delete it. Please bear in mind that you are not authorized to use it for any purposes. Please consider the environment before printing this email. ________________________________ De: chimera-users-bounces@cgl.ucsf.edu <chimera-users-bounces@cgl.ucsf.edu> en nombre de chimera-users-request@cgl.ucsf.edu <chimera-users-request@cgl.ucsf.edu> Enviado: martes, 21 de junio de 2016 21:00:02 Para: chimera-users@cgl.ucsf.edu Asunto: Chimera-users Digest, Vol 158, Issue 30 Send Chimera-users mailing list submissions to chimera-users@cgl.ucsf.edu To subscribe or unsubscribe via the World Wide Web, visit http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users or, via email, send a message with subject or body 'help' to chimera-users-request@cgl.ucsf.edu You can reach the person managing the list at chimera-users-owner@cgl.ucsf.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of Chimera-users digest..." Today's Topics: 1. Re: Module import error (Subha Kalyaanamoorthy) 2. Re: Module import error (Greg Couch) ---------------------------------------------------------------------- Message: 1 Date: Mon, 20 Jun 2016 16:27:14 -0600 From: Subha Kalyaanamoorthy <kalyaana@ualberta.ca> To: Chimera-users@cgl.ucsf.edu Subject: Re: [Chimera-users] Module import error Message-ID: <CAFuN1V=PtjK=nBd6+-_4Tir1T+xc8JebJvx0frzbeoyqEUq1og@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi Greg, Thanks for the kind reply. Sorry about the typo. The environment variables of the system seem fine to me. I also tried calling Chimera from the same directory as the script and its working fine. However, calling the chimera script using "python sample.py" doesn't work and using absolute path to chimera didn't help too. I tried installing pychimera, but end up with the same kind of error when I try pychimera -i import pychimera ImportError: No module named pychimera Couldn't understand what's going on with these import modules. I would greatly appreciate any suggestions to solve this. Thanks, Subha On Mon, Jun 20, 2016 at 4:05 PM, Greg Couch <gregc@cgl.ucsf.edu> wrote:
(I assume you meant --nostatus)
For me the simple test of a file with:
import os os.system("chimera --nogui --nostatus")
works just fine. So it's probably something about your particular setup that is tickling this bug.
It might be the directory that you're running the script in, it might have python modules/packages that conflict with chimera's. Or it might something in the environment. Chimera tries to protect its python from the user's environment, but maybe we missed something. Also double check that the chimera you're invoking is the one you're expecting -- try using an absolute path to chimera while you're debugging this.
HTH,
Greg
On 06/20/2016 01:18 PM, Subha Kalyaanamoorthy wrote:
Hi There,
I am trying to call a script with Chimera commands(saved as sample.py file) in another python program using os.system("chimera --nogui --nostats sample.py") and I get an module load error as below,
import chimera
ImportError: No module named chimera
However, if I call the script with chimera it works, for eg., chimera --nogui --nostats sample.py typed directly in terminal is working.
Can anybody help fix this error?
Thanks in advance,
Best Regards,
Subha
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
-- Dr. Subha Kalyaanamoorthy Post Doctoral Fellow Faculty of Pharmacy and Pharmaceutical Sciences University of Alberta Edmonton, Canada.
participants (1)
-
Jaime Rodríguez-Guerra Pedregal