<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Alexander,<div class=""><br class=""></div><div class=""> Your error says it can't import libpython3.7m.so the Python language system library. That suggests that you ran your test.py script in a strange way. A few ways to run your Python script are</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>$ chimerax test.py</div><div class=""><br class=""></div><div class="">Don't start a graphical user interface.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>$ chimerax --nogui.py</div><div class=""><br class=""></div><div class="">Start ChimeraX and after it starts use a ChimeraX command to open the script</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>$ chimerax</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>ChimeraX command "open test.py"</div><div class=""><br class=""></div><div class=""> Tom</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 22, 2021, at 8:34 AM, Alexander Julian <<a href="mailto:ajulian@hawk.iit.edu" class="">ajulian@hawk.iit.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family: tahoma, sans-serif;">Good morning,<br class=""><br class="">I am currently trying to create a python script that hides atoms and shows ribbons in a .pdb file.<br class=""><br class="">However, I am getting an error while trying to initialize a session. I've been trying to debug the problem to the best of my ability, but I am unable to figure out the issue.</div><div class="gmail_default" style="font-family: tahoma, sans-serif;"><br class=""></div><div class="gmail_default" style="font-family: tahoma, sans-serif;">My code:</div><div class="gmail_default" style="font-family: tahoma, sans-serif;">```</div><div class="gmail_default"><div class="gmail_default"><font face="tahoma, sans-serif" class="">import chimerax.core.session as cxsession</font></div><div class="gmail_default"><font face="tahoma, sans-serif" class="">session = cxsession.Session('name')</font></div></div><div class="gmail_default" style="font-family: tahoma, sans-serif;">```</div><div class=""><br class=""></div><div class=""><div class="gmail_default" style="font-family: tahoma, sans-serif;">My error:</div><div class="gmail_default" style="font-family: tahoma, sans-serif;">```</div><div class="gmail_default" style="font-family: tahoma, sans-serif;"><div class="gmail_default"> File "./test.py", line 15, in <module></div><div class="gmail_default"> session = cxsession.Session('name')</div><div class="gmail_default"> File "/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/session.py", line 437, in __init__</div><div class="gmail_default"> self.app_name = app_name</div><div class="gmail_default"> File "/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/session.py", line 508, in __setattr__</div><div class="gmail_default"> if not name.startswith('_') and self.snapshot_methods(value, base_type=StateManager) is not None:</div><div class="gmail_default"> File "/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/session.py", line 535, in snapshot_methods</div><div class="gmail_default"> from .serialize import PRIMITIVE_TYPES</div><div class="gmail_default"> File "/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/serialize.py", line 42, in <module></div><div class="gmail_default"> from ._serialize import msgpack_serialize_stream, msgpack_deserialize_stream, PRIMITIVE_TYPES</div><div class="gmail_default">ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory</div></div><div class="gmail_default" style="font-family: tahoma, sans-serif;">```</div><div class="gmail_default" style="font-family: tahoma, sans-serif;"><br class=""></div><div class="gmail_default" style="font-family: tahoma, sans-serif;">I look forward to your assistance.</div><br class=""></div><div class=""><div class="gmail_default" style="font-family: tahoma, sans-serif;">Best,</div><div class="gmail_default" style="font-family: tahoma, sans-serif;">Alexander</div><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><b class=""><font color="#666666" face="tahoma,sans-serif" style="background-color:rgb(255,255,255)" class="">Alexander T. Julian</font></b></div><div class=""><font color="#666666" face="tahoma, sans-serif" class="">PhD Student, Department of Biology, Microbiology</font></div><div class=""><font color="#666666" face="tahoma,sans-serif" style="background-color:rgb(255,255,255)" class="">Bachelor of Science, Biomedical Engineering, <span style="text-align:left;text-transform:none;text-indent:0px;letter-spacing:normal;font-family:tahoma,sans-serif;font-size:13.33px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;float:none" class="">Cell and Tissue Specialization</span> 2021</font><br class=""></div><div class=""><font color="#666666" face="tahoma,sans-serif" style="background-color:rgb(255,255,255)" class="">Master of Advanced Study, Chemical Engineering 2021</font></div><div class=""><font color="#666666" face="tahoma,sans-serif" style="background-color:rgb(255,255,255)" class="">Illinois Institute of Technology</font></div><div class=""><font color="#666666" face="tahoma,sans-serif" style="background-color:rgb(255,255,255)" class="">Chicago, IL 60616</font></div><div class=""><font color="#666666" face="tahoma,sans-serif" style="background-color:rgb(255,255,255)" class=""><i class="">Phone (727)-735-7104</i></font><br class=""></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""></div></blockquote></div><br class=""></div></body></html>