Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Jupyter Notebook without Anaconda on Ubuntu?

There is a lot of information available to run Jupyter Notebook with Anaconda but could not find any info to run Jupyter without Anaconda.

Any pointer would be much appreciated!

like image 987
Soumyaansh Avatar asked May 15 '18 16:05

Soumyaansh


People also ask

Can I run Jupyter without Anaconda?

Yes Jupyter is a standalone program.

How do I run a Jupyter Notebook in Ubuntu terminal?

To install Jupyter Notebook on Ubuntu, we need to set up Anaconda environments for JupyterLab: 1. SSH to your server, open your terminal and run the following apt update and apt install command. This command updates your server's package index and installs the dependencies required to add new repositories over HTTPS.

Is Anaconda The only way to install Jupyter?

It's as if you can only install Jupyter with Anaconda. This is not so. Why is Anaconda so popular for installing Jupyter Notebook? Among the reasons is that once you install Anaconda, you get running using Jupyter.


2 Answers

See Gordon Ball's Jupyter PPA, the most actively maintained Jupyter PPA as of this writing with support for both Ubuntu 16.04 and 18.04 (LTS).

Installation: It's a Ball

Thanks to Gordon's intrepid efforts, installation of Jupyter under Ubuntu trivially reduces to:

sudo add-apt-repository ppa:chronitis/jupyter
sudo apt-get update
sudo apt-get install jupyter

Doing so installs the jupyter metapackage, providing:

  • A standard collection of Jupyter packages published by this PPA, including:
    • Jupyter's core and client libraries.
    • Jupyter's console interface.
    • Jupyter's web-based notebook.
    • Tools for working with and converting notebook (ipynb) files.
    • The Python3 computational kernel.
  • The /usr/bin/jupyter executable.

As W. Dodge's pip-based solution details, the browser-based Jupyter Notebook UI may then be launched from a terminal as follows – where '/home/my_username/my_notebooks' should be replaced with the absolute path of the top-level directory containing all of your Jupyter notebook files:

    jupyter notebook --notebook-dir='/home/my_username/my_notebooks'

Why Not Acanaconda or pip?

For Debian-based Linux distributions, the optimal solution is a Debian-based personal package archive (PPA). All other answers propose Debian-agnostic solutions (e.g., Anaconda, pip), which circumvent the system-wide APT package manager and hence are non-ideal.

Installing Jupyter via this or another PPA guarantees automatic updates to both Jupyter and its constellation of dependencies. Installing Jupyter via either Anaconda or pip requires manual updates to both on an ongoing basis – a constant thorn in the side that you can probably do without.

In short, PPA >>>> Anaconda >> pip.

like image 40
Cecil Curry Avatar answered Oct 01 '22 03:10

Cecil Curry


Basically the process is as follows:

pip3 install --upgrade pip
pip3 install jupyter
jupyter notebook # run notebook

Run a specific notebook:

jupyter notebook notebook.ipynb

Using custom IP or port:

jupyter notebook --port 9999

No browser:

jupyter notebook --no-browser

Help:

jupyter notebook --help



Answer from the following sources:

SOURCE 1 SOURCE 2

like image 71
Dodge Avatar answered Oct 01 '22 04:10

Dodge