No, there currently isn't such a thing.
Any equivalent to virtualenvwrapper's hook scripts in conda?
-
03-10-2022 - |
Question
With virtualenvwrapper, one can install "hooks" that can be run, say, after a virtualenv is activated.
I suspect not, but wanted to confirm.
Solution
OTHER TIPS
You can patch conda's activate
script directly. But your changes will be overwritten whenever you update conda. Here's an example that changes to a directory in your $HOME based on the environment name:
echo 'cd "$HOME/code/$1"' >> "$(which activate)"
Unfortunately this will only work if you use the old-school activate command:
source activate project_name
rather than conda activate project_name
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow