C1W1 Ungraded lab - conda activate error

I need help with ‘conda activate mlep-w1-lab’.
I am using MacOS 11.7.10.

First time, in the terminal everything worked. I was able to bring up ‘jupyter lab’ and browse around.

I the browser tab in which jupyter notebook was running, and in the terminal using Ctrl-C I shutdown the sessions.

However, today when I did ‘jupyter lab’ nothing worked. I tried to do ‘conda activate’ but gives me error.

Please see the screenshot. Any help is appreciated. Thank yo.

1 Like

Hello @Shiva_Kondapalli

you need to run Conda init before Honda activate, kindly refer the below link

Let me know if you still have issue.

Regards
DP

2 Likes

Thank you @Deepti_Prasad,

That solved the issue and I was able to run the lab. Your help is much appreciated.

Shiva

2 Likes

Based on linux:

Odds are good that you didn’t install conda the right way or you’ve stumbled on a bug (consider reporting to conda if that’s the case). When conda installation completes, you should be provided with an option to add a small snippet to a shell resource configuration file like ~/.bashrc that’s similar to:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/myusername/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/myusername/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/myusername/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/myusername/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

Upon sourcing the file or quitting the terminal app and opening it again, you don’t have to run conda init.

1 Like