ubuntu-18.04 install jupyter notebook

Jupyter Notebook is a web-based application for interactive computing. Allows users to combine explanatory text, mathematical equations, code, and visual content into one easy-to-share document.

Ready to work

Update package

sudo apt-get update

Install python3 (default python3 will install the latest version, generally Ubuntu comes with python to view in the /usr/local directory):

sudo apt-get install python3

Install python third-party installation tools:

sudo apt-get install python3-pip

View version information:

python3 -V

Install jupyter notebook

pip3 install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple

Run jupyter notebook:

jupyter notebook

The following errors may appear:

Find out jupyter:

find -name jupyter

method one:

Enter the above bin path and run jupyter notebook:

~/.local/bin/jupyter-notebook

Method two (directly add the above path to the environment variable):

Edit ~/.bashrc file

sudo vim ~/.bashrc

Add the following content:

export PATH=~/.local/bin:${PATH}

After saving the file, execute the source command to make the above configuration effective in the current terminal:

source ~/.bashrc

After configuring the environment variables, you can execute the following command to run jupyter notebook every time:

jupyter notebook

Guess you like

Origin blog.csdn.net/xwmrqqq/article/details/106296206