[PYTHON] IMPORTANT: You may need to close and restart your shell after running'conda init'.

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

Error message encountered while setting up the environment in Anaconda

meaning

After running'conda init', you need to close the terminal or restart the shell.

Symptoms

--Create a virtual environment with anaconda as usual

$ conda create -n <env_name>

--Check if the environment has been created with the following command

$ conda info -e

The environment has been created correctly

An error occurs here

--An error was output when trying to activate the virtual environment as shown below.

$ conda activate <env_name>

Error message

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

Enter the command according to the error message

--According to the error message, conda init <shell_name>! I said, so first follow the instructions. --Since you were using bash, enter the following command

$ conda init bash

When I enter it as it is, the message that bash_profile has been updated (modified) appears.

Reload bashrc

$ source ~/.bachrc

Here, opening a new terminal gives the same result.

This completes

Recommended Posts

IMPORTANT: You may need to close and restart your shell after running'conda init'.
You may need git to install the jupyter lab extension