Handling Python packages effectively can be one of the more time-consuming parts of any computational workflow. For molecular modelers using SAMSON, the process is streamlined thanks to its dedicated Python Package Manager tool integrated into the Python Console. Whether you’re aiming to utilize cutting-edge machine learning libraries, data-analysis tools, or visualization packages, managing these dependencies is straightforward. Let’s take a closer look at how you can manage Python packages in SAMSON efficiently.
Accessing the Python Package Manager
To start managing Python packages, open the Python Console in SAMSON. Simply navigate to Edit > Manage packages…. This action opens the Python Package Manager window, offering an intuitive interface to list, install, and uninstall Python packages.

Inside this window, you’ll find a display of all currently installed packages and their corresponding versions. This gives you a quick overview of what’s already set up in your environment.
Installing Python Packages
Installing new packages is as simple as typing the name of the desired package in the provided input box and clicking Install. The manager utilizes pip, the popular Python package installer, under the hood, so you maintain full flexibility. You can specify package versions and even use pip flags. For example:
numpy==1.21.0installs version 1.21.0 of the numpy package.matplotlib>=3.4.0installs matplotlib with a minimum version of 3.4.0.scipy --upgradeensures that scipy is upgraded to the latest version.

Need to install a package not available on PyPI? You can handle this by specifying the path to a local package within the manager. This feature supports installing packages in an editable mode, ideal for those customizing their own Python libraries during development.
Uninstalling Python Packages
Removing unused or outdated packages is equally straightforward. By entering the package name and clicking Uninstall, you can ensure your Python environment stays clean and efficient. This functionality applies to both packages from PyPI and locally installed Python packages.
When Editable Mode Comes in Handy
Editable mode is perfect for developers who need to tweak a package’s code frequently. By avoiding the need to reinstall the package after every modification, editable installations can save significant time during iterative development cycles. However, do note the caution for macOS users: some editable-mode installations may fail to reload on the next SAMSON launch, necessitating a non-editable installation as a workaround.

Conclusion
SAMSON’s Python Package Manager integrates seamlessly into its Python Console, making it a valuable resource for molecular modelers. Whether you’re configuring scientific libraries, adding visualization tools, or incorporating advanced machine learning packages, this tool simplifies the process, letting you focus on your research and development.
To explore more, visit the official documentation page and learn how SAMSON can accelerate your workflow.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
