Effortlessly Manage Python Packages in SAMSON

For molecular modelers working with SAMSON, custom Python scripting can unlock powerful workflows, but managing Python packages can feel challenging. Whether you need to add a new package for a simulation task or debug existing installations, SAMSON simplifies Python package management through its integrated Python Package Manager.

Why Managing Packages Matters

Molecular modeling often involves diverse tasks, from simulations to bioinformatics analyses, and often requires Python libraries like NumPy, Biopython, or TensorFlow for deep learning. Installing, upgrading, or uninstalling these packages should be straightforward—this is where the Python Package Manager in SAMSON comes in handy, eliminating the need for command-line operations.

Installing Packages

To install a Python package directly in SAMSON:

  1. Open the Python Console, and navigate to Edit > Manage packages….
  2. In the Package Manager window, type the name of the desired package and click Install.

Manage packages...

The Python Package Manager supports pip-like syntax, meaning you can specify versions (e.g., package==version) or flags (e.g., package --upgrade) as needed.

Pro tip: If you’re working on a project requiring local modules, you can install local Python packages by providing a path to the package folder containing setup.py. SAMSON even supports the editable mode for packages under development, so any changes are dynamically reflected without reinstallation.

Package Manager: install a local Python package

Uninstalling Packages

Need to remove an unused or problematic package? Simply type the package name in the Package Manager and click Uninstall. This feature works for both PyPI and locally installed packages.

A Few Notes and Tips

Note

For non-PyPI packages or custom modules, consult the documentation under Installing a local Python package for additional guidance.

Warning

On certain macOS setups, packages installed in editable mode might not load during subsequent launches of SAMSON. Consider switching to non-editable mode or registering source paths manually in sys.path as necessary.

Streamline Your Python Workflow

SAMSON continues to provide tools for a seamless coding experience that integrates Python’s full potential into your molecular modeling work, ensuring a smooth and user-friendly environment via the Python Package Manager. By embedding these capabilities directly within its interface, SAMSON removes unnecessary distractions and focuses on what matters—your molecular design and analysis tasks.

Discover more about Python scripting in SAMSON by visiting the documentation page.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at samson-connect.net.

Comments are closed.