1、首先按照https://www.pyimagesearch.com/2017/09/25/configuring-ubuntu-for-deep-learning-with-python/ 地址中的內容配置好virtualevn虛擬環境,
假設當前虛擬環境為dl4cv,則首先啟動它:workon dl4cv, 鍵入: $: python, 將看到當前虛擬環境為python3.6.1即python3的環境。
2、輸入 $: jupyter notebook,將啟動瀏覽器jupyter,啟動后,點擊右側圖標 New,如果只有Python2,則首先退出該jupyter
3、在dl4cv虛擬下,安裝jupyter: pip install ipython 以及 pip install jupyter
4、等待安裝完成,通過命令:$: python -m ipykernel install --user 將當前環境的python3加入到jupyter中。
5、此時再次鍵入: $: jupyter notebook,將啟動瀏覽器jupyter,啟動后,點擊右側圖標 New,將能同時看到Python2和Python3。