#Python virtual envs being cleared from path (mise) and showing virtual env in prompt

7 messages · Page 1 of 1 (latest)

craggy dragon
#

I have seen a couple posts about this and highly doubt I'm the only python dev trying to use omarchy. So for those that would rather see some solutions instead of spending the time I did to debug here are the issues and solutions I ran into when trying to use python virtual envs on Omarchy (stock).

Virtual Env not showing in shell prompt

  • This is from Starship. How to configure it can be found here - https://starship.rs/config/#python but if you just want to copy pasta something then here you go. Find starship.toml in $USER/.config and just pasta this
add_newline = true
command_timeout = 200
format = "[$directory$git_branch$git_status$python]($style)$character"

 ... rest of file ...

[python]
symbol = "🐍 "
style = "bold yellow"
format = "[$symbol$virtualenv]($style)"
disabled = false

when you are in a python dir you'll see the snake icon and when you have a .venv active you'll see (.venv) in your prompt now.

Second issue - I noticed when sourcing venv and then changing directories the .venv was being erased from $PATH. This appears to be a function of mise. There is also an issue in their discussions here - https://github.com/jdx/mise/discussions/5918

Essentially to prevent your $PATH from being overwritten on cd create a mise.toml in the root of your project

[tools]
python = "Python version here. Example - 3.13"

[env]
_.python.venv = "whatever you name your venv here example - .venv"

Hope this helps others as it took me a minute to figure out what was happening to my virtual envs whenever I changed directory

GitHub

In mise 2025.8.4, virtualenvs are no longer being added to $PATH. mise doctor version: 2025.8.4 macos-arm64 (2025-08-03) activated: yes shims_on_path: no self_update_available: no build_info: Targe...

west crow
#

I copied your starship config and it still didn't work. I was trying to get starship to see it was a python project by having a .python-version file (excuse lack of code block, currently on mobile), But that didn't work. Any ideas?

west crow
#

nvm I is stupid lol forgot the top part of your config file

craggy dragon
#

Glad it helped!

west crow
wispy sorrel
#

so I also copied this, and didn't got any change

#

did I missed anything