ubuntu系统中安装jupyter notebook以及jupyter lab
ubuntu系统中安装jupyter notebook一直报错,说缺模块,实际上该模块存在。应该时电脑里面有多个版本的python,冲突导致的。
另外,在安装常用软件如pandas时,也报错缺模块。
ModuleNotFoundError: No module named ‘_bz2’
因为从终端安装python3版本时,最新版本的python3.6+缺少一些文件。需要手动添加。按照正常的步骤安装python前预装一些文件就不会有这些问题。可以参考下面教程安装:
https://blog.csdn.net/melon__/article/details/100560971
解决方法是:
sudo apt-get install libbz2-dev
其次重新编译Python3:
进入 Python-3.6.4的安装目,重新编译
cd /home/cct/Python-3.6.4
sudo ./configure --enable-optimozations
sudo make
sudo make install
编译完成后,开始安装jupyter notebook以及jupyter lab
sudo pip3 install pandas
sudo pip3 install jupyter notebook
sudo pip3 install jupyterlab
安装成功。
Successfully installed jupyterlab-1.2.3 jupyterlab-server-1.0.6
不加sudo可能会遇到权限不够的错误。