If you have an M-series Mac, download a Python build that targets the ARM64 architecture. The python.org installer provides Universal binaries for Python 3.9 and later.
Required tools
Install Xcode
Download Xcode from the Mac App Store. After the download finishes, launch Xcode once to let it complete the component installation, then install the command-line tools:
Install Python 3
Download and run the macOS installer from python.org. This configures your system for Python 3 and can be upgraded by downloading a newer installer later.Alternatively, use Homebrew:Confirm the installation:
Create a virtual environment
A virtual environment isolates Basilisk’s dependencies from the rest of your system.Your prompt will show
(.venv) when the environment is active. To deactivate it later:Install build dependencies
This installs CMake, Conan, SWIG, and other build tools:Conan repository configuration is handled automatically by
conanfile.py.Build Basilisk
From the Basilisk root directory, run:This fetches C++ dependencies, generates an Xcode project inside
dist3/, and compiles the project. A first build typically takes 15–30 minutes depending on your hardware and the options you enable.Build options
Pass options toconanfile.py to customize the build:
| Option | Default | Description |
|---|---|---|
--vizInterface | True | Include protobuf and ZeroMQ for Vizard connectivity. |
--opNav | False | Include OpenCV for visual navigation modules. |
--mujoco | False | Include MuJoCo physics integration (beta). |
--buildProject | True | Compile after generating the project file. |
--buildType | Release | Release or Debug. |
--clean | — | Delete dist3/ before configuring for a fresh build. |
--pathToExternalModules | — | Path to an external modules folder. See Custom modules. |
opNav, no Vizard, and a clean distribution folder:
Building in Xcode (IDE)
If you want to configure the project without compiling immediately — useful during development — disable the automatic build step:dist3/basilisk.xcodeproj in Xcode. Set the active scheme to ALL_BUILD, and build with Product → Build For → Profiling.
Speeding up builds with sccache
sccache caches compiled C++ object files, dramatically reducing clean-build times.
Running tests
Common issues
CMake can't find the compiler tools
CMake can't find the compiler tools
Run:The output should be Clear the CMake cache (delete
/Applications/Xcode.app/Contents/Developer. If you see /Library/Developer/CommandLineTools or another path, reset the developer directory:dist3/) and run python3 conanfile.py again.Build fails after a macOS system update
Build fails after a macOS system update
A macOS update can invalidate the compiler path or invalidate cached build artifacts. Perform a clean build:
Problems cloning to a specific directory
Problems cloning to a specific directory
Clone the repository into the default directory first, then move the folder to your preferred location after cloning completes.