Installing and Managing Python Packages in SAMSON Without Leaving the Interface

Working on complex molecular modeling workflows often means tapping into the wealth of Python’s ecosystem—NumPy for computations, SciPy for simulations, PyTorch for deep learning, and more. But for many scientists, switching between a terminal, a code editor, and a molecular modeling tool can break the flow—or introduce configuration headaches. If you’ve ever struggled with setting up Python environments in separate tools or wished that package management was easier inside your modeling platform, you might want to know about SAMSON’s built-in Python Package Manager.

This feature lets you manage Python packages directly within SAMSON’s Python Console, no external terminal required. Whether you need to install a deep learning library or uninstall a rarely used module, you can do it all inside the platform you’re already working in. Here’s how it works and why it can save time for researchers, educators, and students alike.

Where to Find It

Inside the SAMSON interface, open the Python Console (Interface > Python Console). From there, go to Edit > Manage packages…. This opens the Python Package Manager, a GUI window for handling everything Python-related.

Manage packages...

Installing Packages from PyPI

Need a package from PyPI? Just type its name, click Install, and that’s it. You can also specify versions or use pip-like syntax if needed:

  • numpy
  • scikit-learn==1.2.0
  • matplotlib >=3.7.0
  • pandas --upgrade

SAMSON takes care of calling pip behind the scenes.

Package Manager: install a Python package

Installing Local Python Packages

If you’ve developed your own Python module or are collaborating on a local package, you can also install it with a file picker. Just supply the path to the folder containing a valid setup.py file and click Install.

You can additionally install it in editable/develop mode—similar to pip install -e. This is especially useful in collaborative projects or active development, allowing you to test changes instantly without reinstalling the package each time.

Install local Python package

Uninstalling Packages

To uninstall a package, just provide its name and click Uninstall. It works with both PyPI-installed and local packages.

A Note on macOS

If you are using macOS, be aware that local packages installed in editable mode may require manual adjustments to sys.path in future SAMSON sessions. Alternatively, you may reinstall them or use the non-editable installation mode.

Why This Matters

Embedding package management directly into a molecular modeling platform streamlines your workflow. Instead of juggling between environments or waiting for IT support to configure packages, researchers can get what they need and get back to work faster. And for students or educators, it lowers the barrier to entry while maintaining a consistent learning environment.

To learn more about scripting in SAMSON and how to take full advantage of the SAMSON Python API, visit the official documentation.

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

Comments are closed.