For molecular modelers who depend on Python scripting to automate workflows, manage data, or customize simulations, keeping track of Python packages is often a pain point. Switching back and forth between development environments or struggling with dependencies can slow down even the most enthusiastic developers. Thankfully, SAMSON offers an integrated solution to manage Python packages effectively within its own environment. Here’s how.
The Python Package Manager in SAMSON
SAMSON’s Python Package Manager empowers you to manage Python packages directly within the platform. Whether you need to install, update, or remove dependencies, you no longer need to leave your molecular design environment to handle these tasks. This is particularly useful when you’re juggling complex molecular modeling projects that require specific Python libraries.
Here’s how to access the package manager:
- Open the Python Console from Interface > Python Console.
- From the Edit menu, select Manage packages….
This will open the Python Package Manager window, as shown below:

Installing Python Packages
Need a new package? Installing Python libraries couldn’t be more straightforward. Follow these steps:
- Enter the name of the package you need in the provided field.
- Click Install.
Here’s what it looks like in action:

You can even specify package versions using standard pip syntax, such as:
package_name==1.2.0for a specific version.package_name>=2.1.0for a minimum version requirement.
If a package requires additional pip flags (e.g., --upgrade), simply append them after the package name.
Installing Local Python Packages
SAMSON also supports the installation of local Python packages. This is particularly useful for those developing their own libraries or testing custom solutions. To install a local package:
- Provide the file path to the package (which should include a
setup.pyfile). - Click Install.

You can also choose to install the package in editable mode (using pip install -e), which dynamically reflects changes to the package without requiring reinstallation. This is ideal for iterative development.
Warning
If you’re using macOS, note that packages installed in editable mode might not load properly on subsequent runs of SAMSON. In such cases, reinstallation in non-editable mode may be necessary.
Uninstalling Python Packages
Need to declutter your environment? SAMSON’s Package Manager lets you uninstall Python packages effortlessly. Simply specify the package name and click Uninstall. Whether the package comes from PyPI or is a local library, the process is seamless.
Why This Matters
Molecular modeling projects are inherently complex, often requiring multiple Python libraries to achieve workflows involving advanced data analysis, machine learning, or simulation. By embedding Python package management directly into the platform, SAMSON ensures molecular modelers can focus on their work rather than manage their environments. This integrated approach eliminates the need to switch contexts and helps you stay productive.
To learn more or dive deeper into scripting capabilities, visit the SAMSON documentation page: https://documentation.samson-connect.net/users/latest/scripting/.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
