curl https://sh.rustup.rs -sSf | bash -s -- -y
source ~/.cargo/env
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.zshrc
brew install pre-commit sccache
NAUTILUS_DIR=~/Developer/nautilus
mkdir -p $NAUTILUS_DIR
cd $NAUTILUS_DIR
git clone --single-branch --branch develop https://github.com/nautechsystems/nautilus_trader.git
cd $NAUTILUS_DIR/nautilus_trader
# uv python list
# --default is useful so pre-commit doesn't install python with another version
uv python install 3.13 --default
rm -rf .venv
uv venv --python 3.13
source .venv/bin/activate
# echo -e "\nsource $NAUTILUS_DIR/nautilus_trader/.venv/bin/activate" >> ~/.zshrc
# source ~/.zshrc
make install-debug
pre-commit install
uv pip install jupyter chardet jupyterlab_execute_time databento polars ipyfilechooser \
lightweight_charts jupytext xmltodict maturin jupyterlab-quarto qgridnext \
anywidget great_tables scipy redis
uv run --active --no-sync jupytext-config set-default-viewer
cargo install --locked evcxr_jupyter
evcxr_jupyter --install
# PYO3_PYTHON=$(which python)
PYO3_PYTHON=$(python -c "import shutil; print(shutil.which('python'))")
echo -e "\n[env]\nPYO3_PYTHON = \"$PYO3_PYTHON\"" >> .cargo/config.toml
PYTHONHOME=$(python -c "import sys; print(sys.base_prefix)")
echo -e "PYTHONHOME = \"$PYTHONHOME\"" >> .cargo/config.toml
git update-index --skip-worktree .cargo/config.toml
# or add these variables to your shell configuration (e.g., ~/.zshrc or ~/.bashrc)
# to avoid occasional git conflicts when config.toml changes
# export PYO3_PYTHON=$(python -c "import shutil; print(shutil.which('python'))")
# export PYTHONHOME=$(python -c "import sys; print(sys.base_prefix)")
# export LD_LIBRARY_PATH="$PYTHONHOME/lib:$LD_LIBRARY_PATH"
git update-index --skip-worktree tests/test_data/large/checksums.json
Last active
December 7, 2025 08:52
-
-
Save faysou/c7adc018e99ac05c9a63ac092a06e7f5 to your computer and use it in GitHub Desktop.
Install nautilus_trader dev env from scratch using uv only
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clear now ๐
(I really missed, this was too old comment ๐ )