I tested the ChimeraX 0.17.1 PyPi package (corresponding to ChimeraX 1.7.1) on Mac and I found it could not be imported (import chimerax fails) because of missing tinyarray, and once that is installed I get the error you report missing chimerax.graphics.  Apparently the package was never tested.  The developer who works on this is on vacation this week and will address it when he is back.  I've made bug reports for these problems

https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/15650

https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/15649

  Tom


On Jul 22, 2024, at 10:43 AM, Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

You would have to show the Python script you are trying to run that produces this error for us to be able to help you.  The PyPi package does not create windows and so it does not render graphics, and if your script is trying to render graphics (e.g. save an image) then that may hit an error like what you see.  I've created a ChimeraX bug report to improve the PyPi ChimeraX package description to describe this limitation.

    https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/15647

Tom


On Jul 22, 2024, at 2:53 AM, ishaanawasthi05--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Dear ChimeraX Team,

I'm trying to use the ChimeraX API in python to automate some analysis. My code is not executing due to some missing/failed imports inside the ChimeraX module.

File "/opt/anaconda3/lib/python3.11/site-packages/chimerax/core/models.py", line 54, in <module>
   from chimerax.graphics import Drawing, Pick, PickedTriangle
ModuleNotFoundError: No module named 'chimerax.graphics'

In the same file (models.py) there are also problems with this:
"from .state import State"

Together they are being used in the following class definition:

class Model(State, Drawing):
   """
   A Model is a :class:`.Drawing` together with an id number
   that allows it to be referenced in a typed command.
   ....
   """

I haven't been able to find any information on what these imports are, why they are missing, or how to resolve this issue. I also don't know if there are more missing imports, as it keeps failing here. I would appreciate your support in getting the Chimerax API to work — if this is the wrong place to ask, please do point me toward the right forum for ChimeraX.

Thanks so much for the help!
_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/


_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/