On Aug 18, 2023, at 10:25 AM, BARRY E DEZONIA via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:Thanks Eric. I have one issue. When I reference chimerax.app_dirs.user_data_dir in my tool ChimeraX complains that "chimerax" is undefined. Do you have a more correct way to find this path? Maybe you had a typo? Note that "ChimeraX" doesn't work either.From: Eric Pettersen <pett@cgl.ucsf.edu>
Sent: Thursday, August 17, 2023 6:27 PM
To: BARRY E DEZONIA <barry.dezonia@wisc.edu>
Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] Plugin development questionsHi Barry,_______________________________________________The problem is that ChimeraX is installed as root on Linux and that a simple “setup.py install” tries to install into the app, which it does not have permission for. You need to get it to install into a user-owned area that ChimeraX looks at for modules. That directory is contained in chimerax.app_dirs.user_data_dir. You get setup.py to install there with “setup.py install —home=value-from-app_dirs”.—EricOn Aug 17, 2023, at 1:18 PM, BARRY E DEZONIA via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:Thanks for the help Eric.I am pretty close to everything working but I think this traj2nmr install approach might be a dead end.In my chimerax tool I have this at the beginning:if importlib.util.find_spec('traj2nmr') is None:app_dir = pathlib.Path(__file__).parent.resolve()subprocess.run(["python3", app_dir / 'Installable' / 'install_traj2nmr.py', sys.executable])Then in my install_traj2nmr.py file that gets called by the above code I have this:this_files_dir = pathlib.Path(__file__).parent.resolve()chimerax = sys.argv[1]os.system(f"cd {this_files_dir}/traj2nmr; {chimerax} --nogui --script 'setup.py install' --exit")And it ALMOST works. Unfortunately it seems that I might need sudo access to run that command. This is the info Chimera gives back when it tries to run my code:/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.dist.fetch_build_eggs(dist.setup_requires)running install/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.warnings.warn(/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.warnings.warn(error: can't create or remove files in install directoryThe following error occurred while trying to add or remove files in theinstallation directory:[Errno 13] Permission denied: '/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/test-easy-install-134656.write-test'There is a paragraph of explanation saying maybe I need root access. So, am I at a dead end? Or can you think of a workaround? Thanks for any insight.From: Eric Pettersen <pett@cgl.ucsf.edu>
Sent: Tuesday, August 15, 2023 6:18 PM
To: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>
Cc: BARRY E DEZONIA <barry.dezonia@wisc.edu>
Subject: Re: [chimerax-users] Plugin development questions_______________________________________________On Aug 15, 2023, at 4:11 PM, Eric Pettersen via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:the traj2nmrexecutablemodule is importable
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/