Nathan,
I can't say why you're getting interpreter error. I think ChimeraX has to start up in order to set its package install destination, which might be why packages installed from the interpreter can't be found by ChimeraX.
You can try using `/path/to/ChimeraX-console -m pip install X`
You might also be able to download the package's .whl file from PyPI/conda and install it with the
toolshed install /path/to/some.whl
ChimeraX command - I've never tried this. However, the bundle API has a straightforward way of requesting other packages to be installed.
As an example of how easy it is to specify PyPI dependencies for a bundle, here's some sections from the bundle_info.xml from my TestManager bundle:
```
<BundleInfo name="ChimeraX_TestManager"
...some other stuff...
<Dependencies>
<Dependency name="ChimeraX-Core" version=">=1.1"/>
<Dependency name="flake8"/>
<Dependency name="pyflakes"/>
<Dependency name="mypy"/>
<Dependency name="pydocstyle"/>
</Dependencies>
...some more stuff...
```
Now, whenever someone installs my TestManager bundle from the Toolshed or the .whl file, ChimeraX will go install flake8, pyflakes, mypy, and pydocstyle from PyPI as well. This is much easier for everyone involved than having to install all the dependencies
manually.
Best,
Tony
From: ChimeraX-users <chimerax-users-bounces@cgl.ucsf.edu> on behalf of Nathan Wood via ChimeraX-users <chimerax-users@cgl.ucsf.edu>
Sent: Monday, July 5, 2021 9:16 PM
To: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu>
Subject: [chimerax-users] Python/Pip Inquiry - ChimeraX - Nathan Wood
[EXTERNAL SENDER - PROCEED CAUTIOUSLY]
Dear ChimeraX
With regards to the python and pip utilities organic to ChimeraX, is it possible to use the conda installed modules within the same script executed by ChimeraX? When running the script through ChimeraX I return an error that the module is not found.
The module was installed using "pip install -e . " while in the conda environment. When I attempted this using the pip provided in ChimeraX Daily Release (22/06/2021, Generic X64 Linux) I return the error:
"/tmp/chx-develop.eKjBho/ChimeraX.app/bin/python3.8: bad interpreter: No such file or directory"
This error can be resolved if I modify the "#!" at the beginning of the pip in a text editor to the python3.8 found within ChimeraX, with pip installing correctly, but ChimeraX still returning that the module is not found. Furthermore I believe this
method is not sound.
Any assistance would be appreciated
Very Respectfully,
Nathan Wood