Reputation: 21
I have both the version of python.I have also installed jupyter notebook individually and when i open the jupyter notebook and go to new section it is showing python 2
I want to use python3 for newer packages.So how can we upgrade the python version.
Upvotes: 1
Views: 1983
Reputation: 2613
More systematic approach would be
1 Install virtualenvwrapper
$ pip install virtualenvwrapper
$ export WORKON_HOME=~/Envs
$ mkdir -p $WORKON_HOME
$ source /usr/local/bin/virtualenvwrapper.sh
$ mkvirtualenv -p $(which python3) jupyter_notebook
2 Install jupyter in this environment
(jupyter_notebook)$ pip install jupyter
3 Run notebook
(jupyter_notebook)$ jupyter notebook
4 To install new packages don't forget to activate newly created virtual environment
$ workon jupyter_notebook
(jupyter_notebook)$ pip install numpy
Upvotes: 1
Reputation: 783
If the kernel was not visible in the kernel options you will have to configure it manually. This is how I did it on my macos.
python3 -m pip install ipykernel
python3 -m ipykernel install --user
After running these commands you should be able to see the kernel in the change kernel option.
Upvotes: 1