I have tried to uninstall the Anaconda and re-install again.
But when I verified the installation, the python environment is still using the default python 2.7.10. From terminal:
username ~ $ conda list
WARNING: The conda.compat module is deprecated and will be removed in a future release.
# packages in environment at /Users/username/anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0
alabaster 0.7.12 py37_0
anaconda 2019.03 py37_0
anaconda-client 1.7.2 py37_0
anaconda-navigator 1.9.7 py37_0
anaconda-project 0.8.2 py37_0
username ~ $ python
Python 2.7.10 (default, Aug 17 2018, 19:45:58)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And my .bash_profile is as below:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/username/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/username/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/username/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/username/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
And I guess it also causes that when I used terminal to launch the Jupyter Notebook, it also uses the python 3, the jupyter can execute pip list
but when execute conda list
, it will prompt:
ValueError: The python kernel does not appear to be a conda environment. Please use ``%pip install`` instead.
The environment of jupyter launched by Anaconda navigator can execute both pip list
and conda list
.