-
-
Notifications
You must be signed in to change notification settings - Fork 1
Installation for Linux
On Linux, MoleditPy is distributed as a separate package, moleditpy-linux, which ships with Open Babel disabled. This avoids segmentation faults caused by conflicts between Open Babel's native libraries and the system/Qt libraries on many distributions — this is still the current, recommended package for Linux (the plain moleditpy PyPI package is built for Windows/macOS only). Because Open Babel is unavailable, 2D-to-3D conversion and force-field optimization on Linux always use the RDKit backend (or Direct mode); see Tips for 2D-to-3D conversion.
MoleditPy supports Python 3.9 through 3.14 (requires-python = ">=3.9, <3.15"). On Python 3.9 specifically, PyQt6 is pinned to <6.10 (all other supported versions use <6.12); pip resolves this automatically.
- Python 3.x is installed.
- pip and venv are available.
moleditpy-installer installs moleditpy-linux automatically (it detects Linux via sys_platform == 'linux') and can register an application-menu .desktop entry, a Desktop shortcut, and the .pmeprj MIME type/file association.
- Create and activate a virtual environment (recommended, keeps the install isolated):
python3 -m venv moleditpy source moleditpy/bin/activate - Install the installer (this pulls in
moleditpy-linuxas a dependency):pip install moleditpy-installer
- Install the system dependency needed for Qt:
sudo apt install libxcb-cursor0 # Debian/Ubuntu based systems - Run the installer:
In an interactive terminal this opens a TUI where you pick the components (Desktop shortcut, application-menu entry,
moleditpy-installer
.pmeprjfile association) and scope (per-user~/.local/share/applications, honoringXDG_DATA_HOME, or system-wide/usr/share/applicationswithsudo moleditpy-installer --system). For scripted use:moleditpy-installer --no-tui. The launcher runs in a terminal window so output/errors stay visible. - Launch:
moleditpy
See the moleditpy-installer README for the full option list, or Shortcut (Linux) to build the .desktop entry manually.
-
Create and activate a virtual environment
Open a terminal and run the following commands to create and activate a new virtual environment named moleditpy.python3 -m venv moleditpy source moleditpy/bin/activate -
Install the package
Install the dedicated Linux package using pip.pip install moleditpy-linux
-
Install system dependencies
This OS-level library might be required for Qt to function correctly.
# For Debian/Ubuntu based systemssudo apt install libxcb-cursor0
-
Run the application
You can now launch the application by typing its name in the terminal.moleditpy
Confirm the installed version with
moleditpy --version.
pip install --upgrade moleditpy-linuxmoleditpy-installer --uninstall # if you used the installer for shortcuts/MIME registration
pip uninstall moleditpy-linuxIf MoleditPy crashes on launch or fails to render on Raspberry Pi OS, see Troubleshooting Launch Issues on Raspberry Pi.