[英]How to upgrade python version from python2 to python3 in ubuntu 16.04
我有兩個版本的python。我也分別安裝了jupyter筆記本,當我打開jupyter筆記本並轉到新部分時,它顯示了python 2
我想將python3用於較新的軟件包,那么如何升級python版本。
更系統的方法是
$ 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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.