From 1cb9b7244cf8592325f1fe7adeb42a87c0a71320 Mon Sep 17 00:00:00 2001 From: Jules van Rie Date: Fri, 18 Sep 2026 12:09:33 +0200 Subject: [PATCH 1/3] Replace pyenv with a uv installed venv --- zprofile | 11 +++++++---- zshrc | 13 +++++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/zprofile b/zprofile index dcaefd2eb4..4d771e9502 100644 --- a/zprofile +++ b/zprofile @@ -1,5 +1,8 @@ -# Setup the PATH for pyenv binaries and shims -export PYENV_ROOT="$HOME/.pyenv" -export PATH="$PYENV_ROOT/bin:$PATH" +# Setup the PATH for Homebrew on Apple Silicon eval "$(/opt/homebrew/bin/brew shellenv 2> /dev/null)" -type -a pyenv > /dev/null && eval "$(pyenv init --path)" + +# Setup the PATH for pyenv binaries and shims +# Uncomment the next lines if you still run a pyenv based setup +# export PYENV_ROOT="$HOME/.pyenv" +# export PATH="$PYENV_ROOT/bin:$PATH" +# type -a pyenv > /dev/null && eval "$(pyenv init --path)" diff --git a/zshrc b/zshrc index 0cebe11525..97d39a5923 100644 --- a/zshrc +++ b/zshrc @@ -22,8 +22,9 @@ export PATH="${HOME}/.rbenv/bin:${PATH}" # Needed for Linux/WSL type -a rbenv > /dev/null && eval "$(rbenv init -)" # Load pyenv (to manage your Python versions) -export PYENV_VIRTUALENV_DISABLE_PROMPT=1 -type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init - 2> /dev/null)" && RPROMPT+='[🐍 $(pyenv version-name)]' +# Uncomment the next lines if you still run a pyenv based setup +# export PYENV_VIRTUALENV_DISABLE_PROMPT=1 +# type -a pyenv > /dev/null && eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init - 2> /dev/null)" && RPROMPT+='[🐍 $(pyenv version-name)]' # Load nvm (to manage your node versions) export NVM_DIR="$HOME/.nvm" @@ -70,3 +71,11 @@ export EDITOR=code # Set ipdb as the default Python debugger export PYTHONBREAKPOINT=ipdb.set_trace + +# Activate the Le Wagon Python venv and update the prompt +LW_VENV="$HOME/.lewagon/venvs/lewagon" +if [ -e $LW_VENV ]; then + export VIRTUAL_ENV_DISABLE_PROMPT=1 + source $LW_VENV/bin/activate + RPROMPT+='[🐍 $VIRTUAL_ENV_PROMPT]' +fi From f70b2d0c6115e01b99fb2269df0f1e0426a30107 Mon Sep 17 00:00:00 2001 From: Jules van Rie Date: Fri, 18 Sep 2026 17:11:30 +0200 Subject: [PATCH 2/3] Set VS Code default defaultInterpreterPath By default fall back to the globally installed lewagon venv. Inside projects, it will activate the in-project venv. --- settings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.json b/settings.json index 191f1c7ddb..ac46afb6da 100644 --- a/settings.json +++ b/settings.json @@ -60,13 +60,13 @@ "notebook.diff.ignoreMetadata": true, "notebook.lineNumbers": "on", "notebook.markup.fontSize": 13, - "python.defaultInterpreterPath": "~/.pyenv/shims/python", + "python.defaultInterpreterPath": "~/.lewagon/venvs/lewagon/bin/python", "python.formatting.provider": "yapf", "python.languageServer": "Pylance", "python.linting.enabled": false, "python.linting.flake8Enabled": false, "python.linting.pylintEnabled": false, - "python.terminal.activateEnvironment": false, + "python.terminal.activateEnvironment": true, "ruby.lint": { "rubocop": true }, From 621c74f2c69a0fbe29f0c10732d2530a38773c24 Mon Sep 17 00:00:00 2001 From: Jules van Rie Date: Fri, 18 Sep 2026 17:13:36 +0200 Subject: [PATCH 3/3] Set autoSetupRemote to avoid push origin master This allows to just do `git push` to push the local branch to origin. --- gitconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/gitconfig b/gitconfig index db3f5bd65d..a9f8c67f1f 100644 --- a/gitconfig +++ b/gitconfig @@ -50,6 +50,7 @@ [push] default = simple + autoSetupRemote = true [branch "master"] mergeoptions = --no-edit