Managing Your Python Packages in SAMSON Without Leaving the Interface

If you’re modeling complex molecular systems and integrating Python tools into your research, chances are you’ve spent time juggling environments, dependencies, and command-line installations. Switching between SAMSON and external terminals to install or troubleshoot packages can become distracting, especially when working on computational experiments or building pipelines for simulations.

Fortunately, SAMSON provides a built-in Python Package Manager that simplifies this process. Whether you’re installing deep learning libraries, visualization tools like matplotlib, or pip-manageable bioinformatics packages, this tool lets you do it all – directly from the interface.

Where to Find the Package Manager

To access the Python Package Manager within SAMSON:

  • Open the Python Console by navigating to Interface > Python Console.
  • In the top menu, click on Edit > Manage packages…

This opens a window where you can install, uninstall, and update Python packages using pip under the hood – no terminal required!

Manage packages...

Installing Packages

You can install packages from PyPI by simply entering the package name and clicking Install. You can also specify versions or add pip-style flags like so:

Package Manager: install a Python package

This gives you the same flexibility you’d get from the command line, while remaining inside SAMSON’s design platform.

Installing Local Packages

If you’re developing your own Python packages or using a research group’s code not available through PyPI, SAMSON supports local package installation. Just provide the path to the folder containing the package (with a valid setup.py) and click Install.

Package Manager: install a local Python package

You can even install the package in editable (develop) mode. This is especially helpful if you’re actively modifying the code—any changes you make will be reflected immediately, without the need to reinstall.

Note: If you’re not planning to modify the source, skip the editable option for smoother usage across sessions, particularly on macOS systems where editable installs can sometimes cause loading issues.

Uninstalling Packages

To uninstall a package, simply type its name and click Uninstall. This works for both PyPI and locally installed packages.

Why It Matters

Keeping all package management native to SAMSON removes a common usability pain for scientists and educators: having to context-switch between environments. It also ensures that computational notebooks, Python-based GUI apps, or scripts you share with collaborators or students run smoothly without misconfigured environments.

Ready to integrate Python tools into your molecular modeling workflow without worrying about compatibility? Managing environments doesn’t have to be a blocker anymore.

To learn more, visit the full documentation: SAMSON Scripting Guide.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.

Comments are closed.