I'm on Mac using only terminal.
Running echo $PATH
returns
/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/username/.cargo/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/username/Venvs/default/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/username/.nvm/versions/node/v17.4.0/bin:usr/local/bin:/Users/username/.cargo/bin
After activating the venv, echo $PATH
only returns
/Users/username/Venvs/default/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/username/.nvm/versions/node/v17.4.0/bin:/usr/bin:/bin:/usr/sbin:/sbin
How do I set i.e. /Users/username/.cargo/bin
to be loaded by all venvs by default? (now it's set in .zshrc)
I can't find any documentation of how do Virtual environments set the $PATH and why. I can't even figure out where do most of the entries come from.
This is a related question, but does not address why the situation happens when I'm in the terminal the whole time: Environment $PATH different when using venv
I have tried to append the PATH
using all these places with no difference:
/etc/bashrc
/etc/profile
~/.bashrc
~/.bash_profile
~/.profile
~/.MacOSX/environment.plist
~/.zshrc
~/.zprofile