Set the default to open jupyter notebook from the anaconda path in Mac

Background: Recently all packages of anaconda have been updated and multiple virtual environments have been set up.

Problem: After starting the terminal, input "jupyter notebook" cannot open jupyter, as follows:

$ jupyter notebook
-bash: jupyter: command not found

1. Temporary solution:

(Activate the base environment of conda, the path below is the installation path of anaconda)

$ source ~/anaconda3/bin/activate
(base) ccm ~

Then enter "jupyter notebook" to open the jupyter notebook interface

2. The ultimate solution:

(Set to open the terminal to enter the base environment by default: enter the following code in the terminal, and restart the terminal)

$ conda config --set auto_activate_base true

After that, every time you open the terminal, enter the base environment of conda by default, and directly enter "jupyter notebook" to open the jupyter notebook interface

If your problem is solved, welcome to bookmark + like + follow~

Guess you like

Origin blog.csdn.net/weixin_45281949/article/details/107012773