How to Activate Conda Environment in Bash Script

In this article let’s discuss about How to Activate Conda Environment in Bash Script. Let’s go through the following methods without any delay.

Method 1:

eval "$(conda shell.bash hook)"
conda activate 

If you are facing any issues with the above approach then try the alternative that is given below. It may look similar by have a try!

Method 2 :

source ~/anaconda3/etc/profile.d/conda.sh
conda activate my_env

Hope the above solution works.

Realted Posts : How to download python-dev