1. Install Python and pip, the Python package manager, if they are not already installed on your system. You can do this by running the following commands in a terminal:
sudo apt-get update
sudo apt-get install python3 python3-pip
2. Install Jupyter Notebook using pip. Run the following command in a terminal:
pip3 install jupyter
3. Create a Jupyter configuration file by running the following command in a terminal:
jupyter notebook --generate-config
4. (Optional) If you want to use Jupyter Notebook with a specific Python environment, you can create a kernel for that environment by running the following command in a terminal:
python3 -m ipykernel install --user --name myenv --display-name "Python (myenv)"
Replace myenv
with the name of your environment.
5. Run Jupyter Notebook by running the following command in a terminal:
jupyter notebook
This will start the Jupyter Notebook server and open the Jupyter Notebook dashboard in your default web browser.
To change the port number that the Jupyter Notebook server listens on, set the c.NotebookApp.port
variable. For example:
c.NotebookApp.port = 8888
To change the IP address that the Jupyter Notebook server listens on, set the c.NotebookApp.ip
variable. For example:
c.NotebookApp.ip = '127.0.0.1'
To change the directory that the Jupyter Notebook server serves notebooks from, set the c.NotebookApp.notebook_dir
variable. For example:
c.NotebookApp.notebook_dir = '/path/to/notebook/directory'
To enable password authentication for the Jupyter Notebook server, set the c.NotebookApp.password
variable to a hashed password. You can generate a hashed password using the jupyter notebook password
command. For example:
c.NotebookApp.password = 'sha1:bcd259ccf...'
These are just a few examples of the many configurations that you can set in jupyter_notebook_config.py
. For a complete list of available configurations, you can refer to the Jupyter documentation as below
https://jupyter-notebook.readthedocs.io/en/stable/config_overview.html.
Leave a Reply