Install RDKit for Cheminformatics with Conda (macOS Apple Silicon)
Install RDKit natively on Apple Silicon with conda from the conda-forge channel in an isolated env, then verify it by parsing an aspirin SMILES string.
RDKit is the de-facto standard toolkit for working with small molecules in Python. It parses SMILES and molfiles, computes descriptors and fingerprints, runs substructure searches, generates 2D and 3D coordinates, and draws publication-quality molecule images. If you are doing any kind of cheminformatics, virtual screening, or ligand preparation, RDKit is almost certainly the first thing you install.
The catch is that RDKit is not a pure-Python package. It is a large C++ library (librdkit) with Python bindings built on Boost, plus a pile of native dependencies for drawing (Cairo, Pillow, FreeType) and numerics (NumPy, pandas). Installing that with pip on a Mac is painful. Installing it with conda from the conda-forge channel is easy, reproducible, and — importantly on Apple Silicon — fully native arm64.
The theme of this whole series is env isolation: instead of polluting your base environment, you create one small conda environment per tool. The exact RDKit build lives inside that env, independent of your system Python. Delete the env and the tool is gone cleanly. That is exactly what we do here.
Prerequisites
You need a working conda. If you do not have one yet, start with our Miniconda on Apple Silicon guide — it gets you an arm64-native conda in a few minutes. This walkthrough was run on an Apple Silicon Mac (macOS 26.5.2) with conda 25.5.1 using the fast libmamba solver.
One quirk you may hit: modern conda refuses to touch the Anaconda defaults channel until you accept its Terms of Service. RDKit does not live on defaults anyway, so we sidestep the whole gate with --override-channels and explicit -c conda-forge — conda never even looks at defaults.
PackagesNotFoundError: rdkit, you almost certainly forgot -c conda-forge.TL;DR copy-paste install
If you just want it working, run this. It creates an isolated env named bu-rdkit, installs RDKit from conda-forge, activates it, and prints the version.
conda create -n bu-rdkit --override-channels -c conda-forge -c bioconda rdkit
conda activate bu-rdkit
python -c "from rdkit import rdBase; print(rdBase.rdkitVersion)"The rest of this guide explains each piece and shows the real output from the machine we ran it on.
Step by step
1. Create an isolated environment
We never install RDKit into base. A dedicated env keeps its native dependencies from colliding with anything else and makes cleanup trivial.
conda create -n bu-rdkit --override-channels -c conda-forge -c bioconda rdkit-n bu-rdkitnames the environment.--override-channelstells conda to ignore your global channel config (includingdefaults) so the Anaconda ToS gate never triggers.-c conda-forge -c biocondalists the only channels to search; RDKit resolves from conda-forge.rdkitis the single spec. Conda pulls in everything else it needs.
2. Watch the solve and install
On our machine the libmamba solver resolved the environment quickly and pulled native osx-arm64 builds for every package. Here is the real output, trimmed to the interesting lines:
### install rdkit -> env bu-rdkit : specs: rdkit ###
Channels:
- conda-forge
- bioconda
Platform: osx-arm64
Collecting package metadata (repodata.json): - \ | / - done
Solving environment: | / done
## Package Plan ##
environment location: /opt/homebrew/Caskroom/miniconda/base/envs/bu-rdkit
added / updated specs:
- rdkit
The following packages will be downloaded:
package | build
---------------------------|-----------------
# ... (smaller packages trimmed)
librdkit-2026.03.4 | h725b6fb_0 6.9 MB conda-forge
# ...
matplotlib-base-3.11.0 | py314hf6804ef_1 8.4 MB conda-forge
# ...
pandas-3.0.3 | py314he609de1_0 13.7 MB conda-forge
# ...
rdkit-2026.03.4 | py314h1b2d1d1_0 18.1 MB conda-forge
# ... (rest trimmed)
------------------------------------------------------------
Total: 63.8 MB
The following NEW packages will be INSTALLED:
# ... (dependencies trimmed)
librdkit conda-forge/osx-arm64::librdkit-2026.03.4-h725b6fb_0
# ...
numpy conda-forge/osx-arm64::numpy-2.5.1-py314hb79c6fa_0
# ...
pandas conda-forge/osx-arm64::pandas-3.0.3-py314he609de1_0
# ...
python conda-forge/osx-arm64::python-3.14.6-h156bc91_100_cp314
rdkit conda-forge/osx-arm64::rdkit-2026.03.4-py314h1b2d1d1_0
# ... (rest trimmed)
Preparing transaction: \ | / - done
Verifying transaction: | / - done
Executing transaction: - \ | / - done
#
# To activate this environment, use
#
# $ conda activate bu-rdkit
#
# To deactivate an active environment, use
#
# $ conda deactivate
real 32.94
A few things worth noting from that output:
- RDKit 2026.03.4 is the version we got, split across
librdkit(the C++ core) andrdkit(the Python bindings), both built forosx-arm64. - It brought in Python 3.14.6, NumPy 2.5.1, and pandas 3.0.3 as native arm64 builds.
- The download was 63.8 MB; the fully installed environment measures about 616 MB on disk (measured with
du -sh; because conda hardlinks shared packages, the incremental cost of an extra env is usually less). RDKit's C++ core, Boost, and the drawing stack add up. - The whole create-and-install finished in 32.94 seconds of wall-clock time on our machine.
3. Activate it
conda activate bu-rdkitYour prompt now shows (bu-rdkit), and which python points inside the env. That is the isolation working: the RDKit build you just installed is the one this shell will use, nothing from the system.
Apple Silicon note
Good news for M-series Mac users: RDKit ships a native osx-arm64 build on conda-forge, so there is no Rosetta involved. You can confirm it in the install output above — the Platform: osx-arm64 line and every package tagged conda-forge/osx-arm64::. Native builds mean full-speed molecule parsing and descriptor calculation, no x86 emulation layer.
conda-forge publishes RDKit for osx-arm64, osx-64, linux-64, linux-aarch64, and win-64, so this same recipe works across platforms. You only need the CONDA_SUBDIR=osx-64 Rosetta fallback (a pattern we use elsewhere in this series) when a tool has no arm64 build — which is not the case for RDKit.
Verify the install
First confirm the version. With the env active:
python -c "from rdkit import rdBase; print(rdBase.rdkitVersion)"rdkitVersion print was not captured on the test machine, but the install output above confirms the build is rdkit-2026.03.4, so this command prints 2026.03.4.Now a real smoke test. This is the honest proof that RDKit works end to end: it parses a SMILES string for aspirin (acetylsalicylic acid), then computes its molecular weight.
from rdkit import Chem
from rdkit.Chem import Descriptors
# Aspirin (acetylsalicylic acid)
mol = Chem.MolFromSmiles("CC(=O)OC1=CC=CC=C1C(=O)O")
print(f"rdkit OK, aspirin MW={Descriptors.MolWt(mol):.2f}")Running that on our machine produced exactly:
rdkit OK, aspirin MW=180.16
180.16 g/mol is the correct molecular weight for aspirin (C9H8O4), so RDKit parsed the structure and did the chemistry right. If you see that number, your install is healthy.
Common errors and fixes
| Error | Fix |
|---|---|
CondaToSNonInteractiveError — Terms of Service not accepted for channel defaults | Add --override-channels -c conda-forge so conda never touches defaults. Or run conda config --add channels conda-forge and conda config --set channel_priority strict. |
PackagesNotFoundError: rdkit | You forgot the channel. RDKit is not in defaults or bioconda — it lives on conda-forge. Always include -c conda-forge. Do not use the old, deprecated rdkit channel. |
conda: command not found (fresh Mac) | Install conda first via our Miniconda guide, or use Miniforge (arm64-native, no ToS gate). |
Version conflicts after installing into base | Never install RDKit into base. Use one isolated env per tool, then activate it. If an env tangles, delete and recreate it. |
Solving environment hangs or is very slow | Use the libmamba solver (default since conda 23.10) or install mamba: conda install -n base -c conda-forge mamba. Also set channel_priority strict. |
import rdkit works but Draw / MolToImage errors on Cairo | The Cairo stack ships with the conda-forge build. Make sure which python points inside bu-rdkit; if needed, conda install -n bu-rdkit -c conda-forge pillow cairocffi. |
Managing the environment
Update RDKit to the newest conda-forge build:
conda update -n bu-rdkit --override-channels -c conda-forge -c bioconda rdkitExport the env so a collaborator can reproduce it exactly (or so you can rebuild it later):
conda env export -n bu-rdkit > bu-rdkit.ymlThat writes a lockfile-style YAML pinning every package and build string, for example:
name: bu-rdkit
channels:
- conda-forge
- bioconda
dependencies:
- rdkit=2026.03.4
- librdkit=2026.03.4
- python=3.14.6
- numpy=2.5.1
- pandas=3.0.3Rebuild from it anywhere with conda env create -f bu-rdkit.yml.
Remove the env entirely when you are done — this is the whole point of isolation, cleanup is one command and leaves nothing behind:
conda remove -n bu-rdkit --allNext steps
With RDKit in place you can prepare ligands for docking — see our practical guide to molecular docking with AutoDock Vina, where RDKit generates 3D conformers from SMILES. If you want to manage molecules interactively in 3D, pair it with PyMOL. And if you are new to the env-per-tool pattern, the conda environments and bioconda channels guide explains why we isolate everything the way we did here.