我有两个版本的python。我还单独安装了jupyter笔记本,当我打开jupyter笔记本并转到新部分时,它显示python 2
我想将 python3 用于较新的软件包。那么我们如何升级 python 版本。
最佳答案
更系统的方法是
1 安装 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在此环境安装jupyter
(jupyter_notebook)$ pip install jupyter
3 运行笔记本
(jupyter_notebook)$ jupyter notebook
4 要安装新软件包,请不要忘记激活新创建的虚拟环境
$ workon jupyter_notebook
(jupyter_notebook)$ pip install numpy
关于python - 如何在ubuntu 16.04中将python版本从python2升级到python3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50721735/