# Why I can't do 'conda activate \<env\>' in JupyterLab?

**URL:** <https://discuss.python.org/t/why-i-cant-do-conda-activate-env-in-jupyterlab/18034>\
**Category:** Python Help\
**Created:** [August 7, 2022, 6:14am UTC](https://discuss.python.org/t/why-i-cant-do-conda-activate-env-in-jupyterlab/18034 "2022-08-07T06:14:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaqhielhorus](https://avatars.discourse-cdn.com/v4/letter/z/c37758/32.png) [@zaqhielhorus](https://discuss.python.org/u/zaqhielhorus)\
**Post date:** [August 7, 2022, 6:14am UTC](https://discuss.python.org/t/why-i-cant-do-conda-activate-env-in-jupyterlab/18034/1 "2022-08-07T06:14:45Z")

</div>

Hi all,

I am using Jupyter lab, I can use conda command such as:

```auto
conda list
conda info --envs
pip list

```

but I cannot use `conda activate <env-name>` even if I have tried `conda init`

This is what shows up when I type `conda init`  
**no change /home/browni/.julia/conda/3/condabin/conda**  
**no change /home/browni/.julia/conda/3/bin/conda**  
**no change /home/browni/.julia/conda/3/bin/conda-env**  
**no change /home/browni/.julia/conda/3/bin/activate**  
**no change /home/browni/.julia/conda/3/bin/deactivate**  
**no change /home/browni/.julia/conda/3/etc/profile.d/conda.sh**  
**no change /home/browni/.julia/conda/3/etc/fish/conf.d/conda.fish**  
**no change /home/browni/.julia/conda/3/shell/condabin/Conda.psm1**  
**no change /home/browni/.julia/conda/3/shell/condabin/conda-hook.ps1**  
**no change /home/browni/.julia/conda/3/lib/python3.9/site-packages/xontrib/conda.xsh**  
**no change /home/browni/.julia/conda/3/etc/profile.d/conda.csh**  
**no change /home/browni/.bashrc**  
**No action taken.**

**Note: you may need to restart the kernel to use updated packages.**

Then I try to activate the environment:

```auto
conda activate lasthrim_env

```

**CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’.**  
**To initialize your shell, run**

\*\* $ conda init \<SHELL\_NAME\>\*\*

**Currently supported shells are:**  
\*\* - bash\*\*  
\*\* - fish\*\*  
\*\* - tcsh\*\*  
\*\* - xonsh\*\*  
\*\* - zsh\*\*  
\*\* - powershell\*\*

**See ‘conda init --help’ for more information and options.**

**IMPORTANT: You may need to close and restart your shell after running ‘conda init’.**

**Note: you may need to restart the kernel to use updated packages.**

 ![Capture d’écran_2022-08-07_13-14-30](https://us1.discourse-cdn.com/flex002/uploads/python1/original/2X/1/15a6c2366a697a6dc5e4cc27be38174731ae66ec.png)

I have restart the notebook, adjust the .bashrc so when I shutdown and restart the conda will be activated.

This conda initialize already in my `.bashrc`:

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

```

---

<div class="post-metadata">

**Author:** ![Avaptel18](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/avaptel18/32/9745_2.png) [@Avaptel18](https://discuss.python.org/u/Avaptel18)\
**Post date:** [November 11, 2022, 5:34pm UTC](https://discuss.python.org/t/why-i-cant-do-conda-activate-env-in-jupyterlab/18034/2 "2022-11-11T17:34:29Z")

</div>

Hi, have you found the solution? I am having the similar issue.

---

<div class="post-metadata">

**Author:** ![zaqhielhorus](https://avatars.discourse-cdn.com/v4/letter/z/c37758/32.png) [@zaqhielhorus](https://discuss.python.org/u/zaqhielhorus)\
**Post date:** [November 12, 2022, 6:35pm UTC](https://discuss.python.org/t/why-i-cant-do-conda-activate-env-in-jupyterlab/18034/3 "2022-11-12T18:35:27Z")

</div>

After billions of years there is a question…

I manage to work it out, but maybe will be different due to I am using a Linux OS…

So

1. First open terminal then type

```auto
source /home/browni/.julia/conda/3/bin/activate 
		
conda activate lasthrim_env

conda install -c conda-forge matplotlib-venn

```

`lasthrim_env` is the name of the environment.

The module will be installed automatically and can be used directly from JupyterLab or if it is not working, try to restart the notebook.

why `source /home/browni/.julia/conda/3/bin/activate ` ?

It is because I want to use Python’ modules for Julia, I am using Jupyter Notebook with Julia kernel / IJulia…
