Skip to main content
These instructions were developed and tested on Windows 11 with Visual Studio Community 17 2022. Basilisk supports Python 3.9 – 3.14 on Windows.
You must run the build from an account with administrator privileges.

Required tools

  • Python 3.9 – 3.14 — 64-bit Windows installer from python.org
  • Visual Studio 17 2022 — Community edition is sufficient. Install the Desktop development with C++ workload.
  • pip — included with Python 3.9+
Use 64-bit (x64) installations for Python and Visual Studio. Mixing 32-bit and 64-bit components is not supported.

Build steps

1

Install Python

Download and run the Windows installer from python.org.In the Optional Features screen, select all options.In the Advanced Options screen, select both:
  • Download debugging symbols
  • Download debug binaries (requires VS 2017 or later)
These options are required if you want to attach a debugger to C/C++ code.
2

Configure environment variables

Add the Basilisk output directory to your PATH so that Python can find the built modules:
  1. Right-click My Computer and select Properties.
  2. Under the Advanced tab, click Environment Variables.
  3. Under User Variables, select Path and click Edit.
  4. Add the Basilisk library directory:
C:\path\to\basilisk\dist3\Basilisk
Replace C:\path\to\basilisk with the actual path to your Basilisk folder. The dist3 folder is created automatically when you run python conanfile.py.
After modifying environment variables, close and reopen Command Prompt. A full machine reboot may be required for the changes to take effect.
3

Clone the repository

git clone https://github.com/AVSLab/basilisk.git
cd basilisk
4

Create a virtual environment

In Command Prompt from the Basilisk root directory:
python -m venv .venv
.venv\Scripts\activate
Your prompt will show (.venv) when the environment is active. To deactivate it later:
deactivate
5

Install build dependencies

pip install -r requirements_dev.txt
This installs CMake, Conan, SWIG, and other build tools.
Do not install conan from the conan.io downloads page. The standalone binary installer causes issues with the Basilisk build system. Always install Conan via pip as shown above.
6

Build Basilisk

From the Basilisk root directory in Command Prompt:
python conanfile.py
This fetches C++ dependencies, generates a Visual Studio 2022 solution in dist3\, and compiles the project.To use Visual Studio 2019 instead:
python conanfile.py --generator "Visual Studio 16 2019"
7

Verify the build

cd examples
python scenarioBasicOrbit.py

Build options

OptionDefaultDescription
--vizInterfaceTrueInclude protobuf and ZeroMQ for Vizard connectivity.
--opNavFalseInclude OpenCV for visual navigation modules.
--mujocoFalseInclude MuJoCo physics integration (beta).
--buildProjectTrueCompile after generating the solution file.
--clean—Delete dist3\ for a fresh build.
--generatorVisual Studio 17 2022CMake generator string.
--pathToExternalModules—Path to an external modules folder. See Custom modules.

Building in Visual Studio (IDE)

If you want to configure the project without compiling immediately:
1

Generate the solution file without building

python conanfile.py --buildProject False
2

Open the solution

Open dist3\basilisk.sln in Visual Studio.
3

Build the solution

  1. Change the active configuration to Release (not Debug) in the solution properties.
  2. Go to Build → Build Solution.

Running tests

python run_all_test.py

Build docs developers (and LLMs) love