For molecular modelers immersed in computational workflows, the flexibility and customization provided by Python scripts can greatly enhance productivity. However, managing Python packages can often become a tedious and error-prone task. SAMSON, the integrative molecular design platform, offers an efficient solution with its integrated Python Package Manager. Here’s how this feature can help you streamline your scripting workflows and seamlessly integrate your favorite Python libraries into SAMSON.
Accessing the Python Package Manager
The Python Package Manager in SAMSON allows you to handle your packages directly from the Python Console. To manage your packages, simply navigate to Edit > Manage packages…. This opens the dedicated Python Package Manager interface, as illustrated below:

Through this interface, you can view the list of installed packages, their versions, and perform actions such as installing or uninstalling packages.
Installing Python Packages
The process of installing Python packages is straightforward in SAMSON. Input the name of the required package and click Install. You can also specify package versions or add extra flags for custom installation behaviors, just as you would with pip. Examples include:
foo==1.2.0to install version 1.2.0 of the foo package.foo>=2.1.0to install at least version 2.1.0.foo --upgradeto update to the latest version.
This functionality empowers users to integrate critical packages for deep learning, bioinformatics, statistics, visualization, and more into their workflows, all within the same platform.

Installing Local Python Packages
If you have custom or proprietary packages, SAMSON supports local installations. Provide the path to the local package (ensuring it’s a valid Python package with a setup.py) and click Install. Additionally, you can enable the editable/develop mode, which reflects any package code changes dynamically without requiring reinstallation. This is particularly useful for Python developers actively modifying their packages during a project.

Keep in mind that for Apple macOS users, packages installed in the editable mode might not load in some configurations on subsequent launches. In these instances, reinstalling in non-editable mode or registering source directories in sys.path might be necessary.
Removing Unnecessary Packages
Over time, unused or outdated packages can clutter your environment. SAMSON facilitates effortless package uninstallation. Simply provide the package name in the manager and click Uninstall. Whether the package originates from PyPI or is a custom local package, the process ensures a clean environment.
Enhancing Reproducibility
The Python Package Manager in SAMSON significantly enhances reproducibility in computational workflows. By simplifying package management within the platform, it minimizes dependency conflicts and ensures that your scripts run seamlessly across environments.
Conclusion
Effective package management is crucial for unlocking the full potential of Python scripting in molecular modeling. By providing a user-friendly interface and advanced features like local installation and editable mode, SAMSON’s Python Package Manager empowers researchers and educators to focus on innovation rather than administrative tasks. For more details on Python scripting in SAMSON, refer to the official documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. Visit SAMSON Connect to download SAMSON today.
