No, there currently isn't such a thing.
Any equivalent to virtualenvwrapper's hook scripts in conda?
-
03-10-2022 - |
Domanda
With virtualenvwrapper, one can install "hooks" that can be run, say, after a virtualenv is activated.
I suspect not, but wanted to confirm.
Soluzione
Altri suggerimenti
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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow