質問

With virtualenvwrapper, one can install "hooks" that can be run, say, after a virtualenv is activated.
I suspect not, but wanted to confirm.

役に立ちましたか?

解決

No, there currently isn't such a thing.

他のヒント

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top