Skip to content

Instantly share code, notes, and snippets.

@faysou
Last active November 21, 2025 12:11
Show Gist options
  • Select an option

  • Save faysou/7f910b545d4881433649551afce69029 to your computer and use it in GitHub Desktop.

Select an option

Save faysou/7f910b545d4881433649551afce69029 to your computer and use it in GitHub Desktop.
Install nautilus_trader dev env from scratch, using pyenv and uv
curl https://sh.rustup.rs -sSf | bash -s -- -y
source ~/.cargo/env

curl -LsSf https://astral.sh/uv/install.sh | sh

brew install pre-commit pyenv pyenv-virtualenv

# Note: poetry is not necessary anymore for nautilus
# curl -sSL https://install.python-poetry.org/ | python3 - #--uninstall
# poetry self update 1.8

cat << 'EOF' >> ~/.zshrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
EOF

source ~/.zshrc

NAUTILUS_DIR=~/Developer/nautilus
mkdir -p $NAUTILUS_DIR
cd $NAUTILUS_DIR
git clone --single-branch --branch develop [email protected]:nautechsystems/nautilus_trader.git
cd $NAUTILUS_DIR/nautilus_trader

pyenv install 3.13

pyenv deactivate
pyenv uninstall nautilus 
pyenv virtualenv 3.13 nautilus  
pyenv activate nautilus  
pyenv global nautilus  
pyenv version

make install-debug
pre-commit install

pip install jupyter chardet jupyterlab_execute_time databento polars ipyfilechooser \
lightweight_charts jupytext xmltodict maturin jupyterlab-quarto qgridnext \
anywidget great_tables scipy
jupytext-config set-default-viewer

cargo install --locked evcxr_jupyter  
evcxr_jupyter --install
cargo install cargo-nextest

PYTHON_PATH=$(which python)
echo -e "\n[env]\nPYO3_PYTHON = \"$PYTHON_PATH\"" >> .cargo/config.toml
git update-index --skip-worktree .cargo/config.toml

git update-index --skip-worktree tests/test_data/large/checksums.json     
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment