Permanently install libraries using magics IPython

I am trying to install the packages ambertools and openmm using the magic command like:

!conda config --set always_yes yes
!conda config --add channels omnia
!conda config --add channels conda-forge
!conda install openmm

However, I have notice that there are 3 different environments and thus I don´t know which one would be the correct. If I choose the default environment, then I can not find the testing function.

import simtk.testInstallation

Any help will be appreciated.


Hi @phisanti, thank you for the report,

The default environment currently is datalore-user but it’s quite huge which makes conda resolving process last forever if we try to install both ambertools and openmm.

We are currently working on more flexible environment management (i. e. being able to choose minimal base environment) as well as better custom channel support, will inform you when something changes

Thanks for the reply. The size of the package rises one question. How is that I can install the packages via jupyter magic (!conda install …) but I cannot via the package manager? Also, I was able to install openmm via github, but after logging out/in again, then the notebook is stuck in the “setting up environment step”.

Currently the package manager isn’t aware of custom conda channels.

Moreover, there was an additional bug that was found thanks to your report, your initial code with the magics should work after tomorrow’s deployment. Thank you again!

At this step the conda performs env update for the modules installed via Library Manager. It, as it was said, is not aware of custom channels so it tries to resolve the versions from predefined channel list. Custom channel support will be added to library manager in the near future

Thanks for the support. I am happy the initial code would work now. However, it begs the question that if the reported code would work, yet the libraries come from “custom channels” or Github, then would the notebook be able to reopen? The second part of your answer, regarding the “setting up environment” seems to imply the opposite. Here is a screenshot of what I currently see:


Sorry if the question sounds a bit silly but I am really new with Datalore and python.

In this case, if custom channels are used, the libraries should be installed with the magics each time the notebook is started on a new machine. Like, the first cell should contains the magics. In this case the Library Manager shouldn’t try to set up environment using default channels: please check that there is no environment.yml in the attached files.

Not at all, instead, the question shows a real problem that has to be resolved from our side. Thanks for your feedback and don’t hesitate to ask more questions if you have any!