ModuleNotFoundError: No module named 'chimerax'

Hello, I am a relatively new user of ChimeraX. I would like to be able to run commands on chimerax 'headless' by passing them from python. When I used 'from chimerax.core.commands import run' within the python program, I get the error 'ModuleNotFoundError: No module named 'chimerax''. I am using a MacOS 13.5 and the version of Chimera I have installed is 1.7.1 Any help is much appreciated. Thank you Antony -- Antony M Jose [he/him/his] Associate Professor, Department of Cell Biology & Molecular Genetics, Director, MOCB Concentration Area - Biological Sciences Graduate Program University of Maryland, Rm 2136, Bioscience Research Building, 4066 Campus Drive, College Park, MD - 20742. Website: https://science.umd.edu/cbmg/joselab/

ChimeraX has it's own internal Python ecosystem. If you run 'chimerax --nogui --exit script.py' or 'chimerax --nogui --exit --script "script.py script-arguments"' it will run script.py in the ChimeraX's Python environment. There will also be a "session" global variable with the ChimeraX session data. --nogui is only needed if you don't need the GUI. And --exit is so ChimeraX exits immediately after running the script. There is also the ChimeraX remotecontrol command that lets other programs control ChimeraX via a REST or XML-RPC interface. And there is a ChimeraX package on pypi.org that does not have any of the GUI elements in it. Currently, it is only available for Python 3.11. That might be sufficient for your needs. HTH, Greg On 4/15/2024 9:01 AM, Antony Merlin Jose via ChimeraX-users wrote:
Hello, I am a relatively new user of ChimeraX. I would like to be able to run commands on chimerax 'headless' by passing them from python. When I used 'from chimerax.core.commands import run' within the python program, I get the error 'ModuleNotFoundError: No module named 'chimerax''. I am using a MacOS 13.5 and the version of Chimera I have installed is 1.7.1 Any help is much appreciated. Thank you Antony
-- Antony M Jose [he/him/his] Associate Professor, Department of Cell Biology & Molecular Genetics, Director, MOCB Concentration Area - Biological Sciences Graduate Program University of Maryland, Rm 2136, Bioscience Research Building, 4066 Campus Drive, College Park, MD - 20742. Website: https://science.umd.edu/cbmg/joselab/
_______________________________________________ ChimeraX-users mailing list --chimerax-users@cgl.ucsf.edu To unsubscribe send an email tochimerax-users-leave@cgl.ucsf.edu Archives:https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (2)
-
Antony Merlin Jose
-
Greg Couch