MDAnalysis / Installation errors

Causes and fixes for MDAnalysis installation errors

Common errors when installing MDAnalysis and reading topology and trajectory files, listed by exact message, each with its cause and fix.

Short answer

MDAnalysis must recognize the format version of binary files such as GROMACS TPR, so an older MDAnalysis cannot read files from newer simulation software, and example data and some features live in a separate package or newer releases.

Setting up your environment this way avoids most errors on this page.

PracticeWhat happens if you skip it
Create an environment with conda create -n mdanalysis -c conda-forge mdanalysis, or pip install --upgrade MDAnalysis.Mixed into an environment with other packages, numpy versions conflict and import fails with undefined symbol.
Use an MDAnalysis version that supports your GROMACS version; GROMACS 2026 TPR files need MDAnalysis 2.11.0 or later.Reading a TPR fails with tpx version not supported.
Install MDAnalysisTests before running the official tutorials.Importing example data fails with MDAnalysisTests package not installed.
Read the documentation for the version you have installed.Modules that only exist in newer releases fail with No module named.
For nonstandard file extensions, set topology_format or format in Universe.You get Cannot autodetect topology type.

Troubleshooting by error message

Find your exact error message. Each entry gives the cause, the fix, and what may come up after the fix.

NotImplementedError: Your tpx version is 134, which this parser does not support, yet

Cause: The TPR file comes from a newer GROMACS than the installed MDAnalysis supports, so the parser does not know this format version.

Fix: Upgrade MDAnalysis; GROMACS 2026 TPR files need 2.11.0 or later. If you cannot upgrade yet, export a .gro or .pdb with gmx editconf and use it as the topology.

What may come next: A .gro or .pdb instead of the TPR loses charges, masses and bonds, which changes analyses that depend on them.

ValueError: Cannot autodetect topology type for file '...' (file extension could not be parsed).

Cause: The file extension is not a format MDAnalysis recognizes, such as .ent.gz files from the PDB.

Fix: Specify the format when creating the Universe, for example mda.Universe("pdb1qsh.ent.gz", topology_format="PDB").

ImportError: MDAnalysisTests package not installed. (on from MDAnalysis.tests.datafiles import PSF, DCD)

Cause: The example files used in the official tutorials live in the separate MDAnalysisTests package, which MDAnalysis does not install.

Fix: Run pip install --upgrade MDAnalysisTests or conda install -c conda-forge MDAnalysisTests, matching your MDAnalysis version.

ModuleNotFoundError: No module named 'MDAnalysis.analysis.atomicdistances'

Cause: This module was added in MDAnalysis 2.5.0 and the installed version is older.

Fix: Upgrade MDAnalysis, and read the documentation for the version you have installed.

error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio" (pip on Windows)

Cause: pip downloaded a source package, which needs the Visual C++ compiler on Windows, typically for an old release or a Python version without a Windows prebuilt package.

Fix: Use conda install -c conda-forge mdanalysis instead; if you stay with pip, install Build Tools for Visual Studio first.

What may come next: The latest MDAnalysis requires Python 3.11 or later, so on older Python pip only finds old source packages.

ImportError: .../c_distances.so: undefined symbol: __svml_round2_mask (after pip install --user on a cluster)

Cause: The numpy or math libraries MDAnalysis was built against differ from those loaded at runtime.

Fix: Create a new conda environment and install with conda install -c conda-forge mdanalysis instead of installing into your user folder with --user.

What may come next: Old packages already in your user folder may still load first, so remove them from ~/.local/lib if needed.

Scientify is a cloud computer with research software installed and AI agents such as Codex and Claude Code built in. Describe what you need in one sentence, for example "analyze this GROMACS trajectory, compute backbone RMSD, per-residue RMSF and radius of gyration, and plot them", and the agent uses the preinstalled MDAnalysis to do the trajectory analysis and plotting, with no software to install and no code to write.

Compared with installing more on your own computer, the cloud computer already has MDAnalysis 2.11.0 with GROMACS 2026.3, so GROMACS 2026 TPR files read directly, with MDTraj and OpenMM in the same environment, and runs continue after you close your laptop.

The cloud computer comes with more computing power: CPU and GPU clusters can be called on demand for large-scale scientific computing. Compute is billed by the minutes you actually use, so nothing is wasted.

Cloud computer
4 vCPU · 8 GB
Top configuration, for data processing and small to medium jobs
Callable GPU
96 GB VRAM
Up to an RTX PRO 6000 per GPU; H800 80 GB and up to 8 × A10G also available
Callable CPU
224 cores · 3 TB
Largest spec, for large parallel computations

References

Frequently asked questions

Can MDAnalysis read GROMACS 2026 TPR files?

Yes, with MDAnalysis 2.11.0 or later. Earlier releases report tpx version not supported.

Is the pip name MDAnalysis or mdanalysis?

pip is case-insensitive, so either works, but code must use import MDAnalysis with that exact case.

Which Python versions does MDAnalysis support?

The latest 2.11.0 requires Python 3.11 or later; older Python versions only get older MDAnalysis releases.

Analyze simulation trajectories with Scientify without setup

Upload your data, describe the computation, and Scientify runs it on a cloud computer that is already set up. New accounts get a free cloud computer and US$5 in credit.