Jupyter Notebook<\/a> is written in Python, we need to install Python3 and its extensions. To do that, execute the following commands:<\/p>\n\n\n\nsudo apt install python3 python3-pip python3-venv -y<\/pre>\n\n\n\nAfter installation, you can check the installed version of Python with the following command:<\/p>\n\n\n\n
python3 -V<\/pre>\n\n\n\nYou should receive the following output:<\/p>\n\n\n\n
root@host:~# python3 -V\nPython 3.10.6\n<\/pre>\n\n\n\n<\/span>Step 3. Create Python Virtual Environment<\/span><\/h2>\n\n\n\nNow, when Python3 is installed, we are ready to create a virtual environment for our Jupyter Notebook application. To do that, follow the commands below:<\/p>\n\n\n\n
cd \/opt\n\npython3.10 -m venv jupyter-venv\n\n<\/pre>\n\n\n\nOnce the virtual environment is created, we need to activate it with the following command:<\/p>\n\n\n\n
source jupyter-venv\/bin\/activate<\/pre>\n\n\n\nAfter the activation, the command prompt should look like this:<\/p>\n\n\n\n
root@host:\/opt# source jupyter-venv\/bin\/activate\n(jupyter-venv) root@host:\/opt#\n<\/pre>\n\n\n\nLet’s move to the last step of this tutorial, about installing the Jupyter Notebook in the virtual environment.<\/p>\n\n\n\n
<\/span>Step 4. Install Jupyter Notebook<\/span><\/h2>\n\n\n\nWe are already in the virtual environment from the previous step:<\/p>\n\n\n\n
(jupyter-venv) root@host:\/opt#<\/pre>\n\n\n\nThe Jupyter Notebook can be installed with the pip3<\/strong> command. The pip3 command will download the jupyter files and will install the required requirements for it.<\/p>\n\n\n\nExecute the following command to upgrade the pip3 before installing Jupyter Notebook.<\/p>\n\n\n\n
pip install --upgrade pip<\/pre>\n\n\n\nThe output should look like this:<\/p>\n\n\n\n
(jupyter-venv) root@host:\/opt# pip install --upgrade pip\nRequirement already satisfied: pip in .\/jupyter-venv\/lib\/python3.10\/site-packages (22.0.2)\nCollecting pip\n Downloading pip-23.1.2-py3-none-any.whl (2.1 MB)\n \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 2.1\/2.1 MB 4.8 MB\/s eta 0:00:00\nInstalling collected packages: pip\n Attempting uninstall: pip\n Found existing installation: pip 22.0.2\n Uninstalling pip-22.0.2:\n Successfully uninstalled pip-22.0.2\nSuccessfully installed pip-23.1.2<\/pre>\n\n\n\nNow, we are ready to install Jupyter with the command below:<\/p>\n\n\n\n
pip3 install jupyter<\/pre>\n\n\n\nAfter some time, you will see the following output:<\/p>\n\n\n\n
Successfully installed Send2Trash-1.8.2 anyio-3.7.0 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 arrow-1.2.3 asttokens-2.2.1 attrs-23.1.0 backcall-0.2.0 beautifulsoup4-4.12.2 bleach-6.0.0 cffi-1.15.1 comm-0.1.3 debugpy-1.6.7 decorator-5.1.1 defusedxml-0.7.1 exceptiongroup-1.1.1 executing-1.2.0 fastjsonschema-2.17.1 fqdn-1.5.1 idna-3.4 ipykernel-6.23.1 ipython-8.14.0 ipython-genutils-0.2.0 ipywidgets-8.0.6 isoduration-20.11.0 jedi-0.18.2 jinja2-3.1.2 jsonpointer-2.3 jsonschema-4.17.3 jupyter-1.0.0 jupyter-client-8.2.0 jupyter-console-6.6.3 jupyter-core-5.3.0 jupyter-events-0.6.3 jupyter-server-2.6.0 jupyter-server-terminals-0.4.4 jupyterlab-pygments-0.2.2 jupyterlab-widgets-3.0.7 markupsafe-2.1.3 matplotlib-inline-0.1.6 mistune-2.0.5 nbclassic-1.0.0 nbclient-0.8.0 nbconvert-7.4.0 nbformat-5.9.0 nest-asyncio-1.5.6 notebook-6.5.4 notebook-shim-0.2.3 overrides-7.3.1 packaging-23.1 pandocfilters-1.5.0 parso-0.8.3 pexpect-4.8.0 pickleshare-0.7.5 platformdirs-3.5.1 prometheus-client-0.17.0 prompt-toolkit-3.0.38 psutil-5.9.5 ptyprocess-0.7.0 pure-eval-0.2.2 pycparser-2.21 pygments-2.15.1 pyrsistent-0.19.3 python-dateutil-2.8.2 python-json-logger-2.0.7 pyyaml-6.0 pyzmq-25.1.0 qtconsole-5.4.3 qtpy-2.3.1 rfc3339-validator-0.1.4 rfc3986-validator-0.1.1 six-1.16.0 sniffio-1.3.0 soupsieve-2.4.1 stack-data-0.6.2 terminado-0.17.1 tinycss2-1.2.1 tornado-6.3.2 traitlets-5.9.0 uri-template-1.2.0 wcwidth-0.2.6 webcolors-1.13 webencodings-0.5.1 websocket-client-1.5.2 widgetsnbextension-4.0.7\n<\/pre>\n\n\n\nNow, we need to generate a config file for Jupyter Notebook settings with the following command:<\/p>\n\n\n\n
jupyter notebook --generate-config<\/pre>\n\n\n\nThe configuration will be created at \/root\/.jupyter\/jupyter_notebook_config.py<\/strong><\/p>\n\n\n\n(jypyter-venv) root@host:\/opt# jupyter notebook --generate-config\nWriting default config to: \/root\/.jupyter\/jupyter_notebook_config.py\n<\/pre>\n\n\n\nOpen the file, uncomment the following settings and set your IP address:<\/p>\n\n\n\n
c.NotebookApp.ip = 'YourServerIPAddress'\nc.NotebookApp.open_browser = True\n<\/pre>\n\n\n\nAfter this, we can execute the last command to make Jupyter Notebook accessible in the browser.<\/p>\n\n\n\n
jupyter notebook<\/pre>\n\n\n\nYou should see the following output:<\/p>\n\n\n\n
jypyter-venv) root@host:\/opt\/jypyter-venv# jupyter notebook\n\n _ _ _ _\n | | | |_ __ __| |__ _| |_ ___\n | |_| | '_ \\\/ _` \/ _` | _\/ -_)\n \\___\/| .__\/\\__,_\\__,_|\\__\\___|\n |_|\n\nRead the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.\n\nhttps:\/\/jupyter-notebook.readthedocs.io\/en\/latest\/migrate_to_notebook7.html\n\nPlease note that updating to Notebook 7 might break some of your extensions.\n\n[I 16:39:53.927 NotebookApp] Serving notebooks from local directory: \/opt\/jypyter-venv\n[I 16:39:53.927 NotebookApp] Jupyter Notebook 6.5.4 is running at:\n[I 16:39:53.927 NotebookApp] http:\/\/YourIPAddress:8888\/?token=01578a58fd2f7f08200177d08f41d31b91660feaa623455d\n[I 16:39:53.928 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).\n<\/pre>\n\n\n\nNow, you can access the Jupyter Notebook on port 8888<\/strong> with your IP address at http:\/\/YourIPAddress:8888.<\/strong><\/p>\n\n\n\nThat was all. You successfully installed Jupyter Notebook on Ubuntu 22.04. If you finding any difficulties while installing this software, you can sign up for one of our NVMe VPS plans and submit a support ticket<\/a>. Our admins are available 24\/7 and will start work on your request immediately. Always trust our epic support.<\/p>\n\n\n\nIf you liked this post on how to install Jupyter Notebook on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"
Jupyter Notebook is an open-source server-client application written in Python. The word “Jupyter” comes from the languages that support this … <\/p>\n
Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":46237,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2072,13,1698],"tags":[2092,59],"yoast_head":"\nHow to Install Jupyter Notebook on Ubuntu 22.04 - RoseHosting<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n\t \n\t \n\t \n