简体   繁体   中英

Can conda automatically activate the env from an env environment.yml?

This my environment.yml:

name: my-env-name
dependencies:
  - blah

To create this env I can cd to the dir with the yml in it and do this:

conda env create

Conda's smart enough to look in the yml and see the env name.

But to activate it why do I have to do this:

source activate my-env-name

Is there a switch to have conda just activate the env name from the environment.yml?

It's impossible. Workaround: direnv with anaconda layout

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM