Install with pip
This guide covers installation of MuscleX using Python’s pip package manager.
Prerequisites
MuscleX is tested with Python 3.10, but should work with Python 3.8 through 3.12.
Check Your Python Version
Run the appropriate command for your platform:
Linux/macOS:
python3 --versionWindows (with Python Launcher):
py --version
If your version falls within the supported range, there’s no need to install Python 3.10.
Install prerequisites
Linux (Ubuntu/Debian)
sudo apt update
sudo apt install python3-pip python3-dev build-essential gfortran
macOS
brew install python gcc
Windows
Install Python from https://www.python.org/
Install Build Tools for Visual Studio
Create and Activate a Virtual Environment (Recommended)
It is strongly recommended to install MuscleX inside a virtual environment to avoid conflicts with other Python packages.
Note:
venvis recommended for pip installations. If you are using Conda, refer to the Conda installation instructions instead.
venv (Linux/macOS)
python3 -m venv musclex_env
source musclex_env/bin/activate
venv (Windows)
python -m venv musclex_env
musclex_env\Scripts\activate
conda (all platforms)
conda create -n musclex python=3.10
conda activate musclex
Install MuscleX
Install Latest Stable Release
pip install --upgrade musclex
Install a Specific Version (e.g., v1.24.0)
pip install musclex==1.24.0
Install Latest Beta/Pre-release from GitHub
pip install --upgrade git+https://github.com/biocatiit/musclex.git
To install a previous release directly from GitHub:
pip install git+https://github.com/biocatiit/musclex.git@v1.15.2
Verifying Installation
To confirm that MuscleX was installed correctly:
pip list | grep musclex
Running MuscleX
After activation, run any program like so:
musclex xv
To deactivate:
deactivate # venv
conda deactivate # conda
Troubleshooting
Missing
Python.h: Install Python development headers:sudo apt install python3-dev # Debian/Ubuntu sudo dnf install python3-devel # Fedora
Build errors: Try installing using
condainstead, or ensure all required build tools are available.Missing GUI: If you get GUI-related import errors, ensure
PyQt5orPySide2is installed:pip install PyQt5
Missing C extension or iNaT error:
pip install -U pandas
Qt platform plugin error (e.g.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb"):First, swap
opencv-python(which bundles its own Qt and frequently clashes with the system Qt) for the headless build:pip uninstall opencv-python pip install opencv-python-headless
If needed, pin to an older OpenCV release:
pip install opencv-python==4.2.0.32
On Linux, the
xcbplugin also requires several native XCB / X11 libraries. On Debian/Ubuntu install:sudo apt update sudo apt install libxcb-cursor0 libxkbcommon-x11-0 libxcb-xinerama0 sudo apt install libxcb-render-util0 libxcb-image0 libxcb-keysyms1 libxcb-icccm4 sudo apt install x11-apps qt6-base-plugins qt6-base-dev sudo apt-get install python3-opencv
To diagnose which specific library is missing, rerun with Qt plugin debug output:
QT_DEBUG_PLUGINS=1 musclex xv
See also the cross-platform troubleshooting guide.
Pip dependency issues: Ensure wheel and numpy are up to date:
pip install --upgrade wheel pip install --upgrade numpy
Optional: Installing Python 3.10
If you need to match the tested version or experience compatibility issues, follow these steps to install Python 3.10.
Linux (Ubuntu/Debian)
sudo apt install python3.10 python3.10-venv python3.10-dev
To use it:
python3.10 -m venv musclex_env
macOS
brew install python@3.10
To use it:
python3.10 -m venv musclex_env
Windows
Install Python 3.10 from python.org
To create a virtual environment:
py -3.10 -m venv musclex_env
Updating MuscleX
Update via pip:
pip install -U musclex
Without updating dependencies:
pip install -U --no-deps musclex
From GitHub:
pip install --upgrade git+https://github.com/biocatiit/musclex.git
System-wide Install (Not Recommended)
If needed:
pip install musclex
Note: This may interfere with other Python packages on your system. Use with caution.