For molecular modelers working with Python-based workflows, managing Python packages within an integrated environment can often be challenging. SAMSON, the integrative molecular design platform, provides an elegant solution to this problem with its built-in Python Package Manager. In this guide, we’ll explore how you can streamline your scripting workflows with SAMSON’s package management capabilities.
Why Python Package Management Matters
Modern molecular modeling often requires extending functionality with external Python packages for deep learning, bioinformatics, statistics, visualization, and other tasks. Installing, updating, or uninstalling these packages manually can disrupt workflows and introduce compatibility issues. SAMSON addresses these challenges directly through its integrated Python Console and Package Manager.
Managing Python Packages in SAMSON
SAMSON’s Python Package Manager is accessible via the Python Console. You can navigate to it by selecting Edit > Manage packages…. This launches the Python Package Manager, where you’ll see a convenient interface to manage your environment.

Installing Python Packages
Installing a new Python package is straightforward. Simply input the name of the package, like you would when working with pip, and click Install. SAMSON integrates pip, so it handles package installation just as the command line would. For instance:
numpyinstalls the latest version of the numpy library.pandas==1.3.3installs a specific version (1.3.3) of the pandas library.scipy --upgradeupdates scipy to its latest version.
You can also install a local Python package by specifying its path. The manager even supports the editable/develop mode (similar to pip install -e), allowing dynamic referencing of package source code while you actively make changes.

Uninstalling Python Packages
Need to clean up your environment? Uninstalling a package is just as easy. Provide the package name, click Uninstall, and it’s removed. This works for both PyPI packages and any locally installed ones.
Important Notes and Tips
If you need to install a package not hosted on PyPI, refer to the section on Installing a Local Python Package in the documentation.
On some macOS configurations, packages installed in the editable mode might not load properly in subsequent sessions. If this happens, reinstall the package in non-editable mode or register its source files in your sys.path.
Integrating Packages with Your Workflow
Once your packages are installed, they are ready to be leveraged in the Python Console or SAMSON’s integrated Code Editor. This seamless integration allows you to focus on what truly matters: designing molecular workflows that solve real problems.
Conclusion
SAMSON’s Python Package Manager brings simplicity, flexibility, and power to managing Python packages in the molecular modeling domain. By embedding pip functionality directly in the Python Console, SAMSON ensures that managing dependencies enhances, rather than disrupts, your workflow.
Ready to dive deeper? Explore the full documentation and take your Python scripting to the next level at SAMSON’s scripting documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at SAMSON Connect.
