calling conda source activate from bash script

后端 未结 3 1807
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-09 07:25

I\'m trying to activate my conda env via a bash script. Even though the script runs fine and my PATH appears to be changed within the script, it\'s getting reset somehow aft

3条回答
  •  盖世英雄少女心
    2020-12-09 08:12

    See the link below,

    digitalocean-how-to-read-and-set-environmental-and-shell-variables-on-a-linux-vps

    below is the snippet from the website,

    This is because environmental variables are only passed to child processes. There isn't a built-in way of setting environmental variables of the parent shell. This is good in most cases and prevents programs from affecting the operating environment from which they were called.

提交回复
热议问题