第一步,安装Python2.7和pip
sudo apt-get update
- 安装python
sudo apt-get -y install python2.7 python-pip python-dev
- 确认python版本
python --version
,输入后该命令后,我的终端输出Python 2.7.12 - 确认pip安装,输入:
pip --version
, 我的终端显示:pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
第二步,安装Ipython和Jupyter Notebook
sudo apt-get -y install ipython ipython-notebook
sudo -H pip install jupyter
- 安装过程中可能遇到一下错误:
ERROR: Cannot uninstall 'ipython'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
-
解决方案:使用下面方式安装
sudo -H pip install --ignore-installed jupyter
第三步,运行 Jupyter Notebook
终端输入:jupyter notebook
打开则安装成功
如有其他问题欢迎留言!