DEV Community

Kevin Ogaba
Kevin Ogaba

Posted on • Originally published at Medium

Installing Jupyter Notebook Using Anaconda Distribution in Linux.

Jupyter Notebook is an application, widely used in the Data Science domain, for creating and sharing documents that contain Live code, Equations, Visualizations, and Explanatory text. A server-client application that allows editing and running notebook documents via the web browser, and it can be executed on a local desktop requiring no internet access. It also has a Dashboard (Notebook Dashboard) and a control panel, displaying local files and allowing you to open notebook documents or shut down their kernels. Jupyter Notebook can also be run without any installation.

Download and install Anaconda

Download anaconda installer for linux(for beginners plus avoid Miniconda). And make sure the Python Distribution is 3.x. This is a large file(approx 581 mb), so it will take some time depending on your internet connection. To install in your machine, run the following command, include the bash command regardless of whether or not you are using Bash shell.

bash ~\<download directory>\<Anaconda3-<version>-Linux-x86_64.sh
Enter fullscreen mode Exit fullscreen mode

The installer prompts to review licence, click Enter to view and scroll down to the bottom of the licence terms and enter yes.
When prompted accept the default installation location or click CTRL-C to terminate installation process, or specify alternative the directory that you want it to be installed. It is recommend to accept the default location PREFIX=/home/<user>/anaconda3 and avoid the path as /usr for the Anaconda Installation. This process takes a few minutes. and finally accept Anaconda to be initialised.
Close and open your terminal window for the installation to take effect, or you can enter the command source ~/.bashrc.

Open Jupyter using Anaconda Navigator

On your terminal, enter the command anaconda-navigator and the Navigator GUI will initialize and be displayed.
On Navigator’s Home tab, in the Applications pane on the right, scroll to the Jupyter Notebook tile and click the Install button to install Jupyter Notebook.

Note: If you already have Jupyter Notebook installed, you can jump right to the Launch step.

  • Launch Jupyter Notebook by clicking Jupyter Notebook’s Launch button.
  • This will launch a new browser window (or a new tab) showing the Notebook Dashboard.

Launching via the Terminal

That also involves just one step: simply type and run jupyter notebook in your Terminal. This will print some information about the notebook server in your terminal, including the URL of the web application which may open on your default browser or copy and paste on the browser, (by default, http://localhost:8888) . If launched successful, the Jupyter Dashboard will open in the browser

How to navigate within Jupyter Notebook

Jupyter Notebook has a user-friendly Editor with a row of easy-to-use navigation/execution buttons on top . These notebook documents are stored in the JSON plain text format, which makes them easy to share and provides for version control. They are also available from a publicly accessible URL and can be shared using Jupyter Notebook Viewer without requiring everyone to install Jupyter Notebook on their machines. These notebooks have a .ipynb extension. Use the complete Notebook User’s manual for reference.

Alternatively, you can also use keyboard shortcuts to access files and execute your Python scripts.
The dashboard automatically detects all the .ipynb files in your directory but if your required files are in a separate directory, it also allows you to upload (has an UPLOAD button in the Dashboard) a file. There is also a NEW button, which allows you to select a Python kernel() from the drop-down menu .

Notebooks and files can be uploaded to the current directory by dragging a notebook file onto the notebook or by using the ‘click here’ text above the list. The notebook list shows green Running text and a green notebook icon next to running notebooks. These remain running until you shut them down — closing the notebook’s page is not sufficient. To shutdown, delete, duplicate, or rename a notebook, check/tick the checkbox next to it and an array of controls will appear at the top of the notebook list. You may also use a similar operations on directories and files. Lastly, to view all of your running notebooks along with their directories, click on the Running tab.


Common issues with Jupyter Notebook

The Jupyter Notebook team is made up of dedicated developers who consistently resolve their open issues. If you wish to take a look at open issues or report a new issue, visit their GitHub. As a beginner, it is your responsibility to check all the possible online resources, such as StackOverflow (currently 6000+ questions have been already answered), for existing solutions, before raising a new one.
Here are some of the common issues that one may encounter and their solutions:

Launch IPython notebook with selected browser
Change IPython/Jupyter notebook working directory
How to change the Jupyter start-up folder
Jupyter Notebook suddenly started asking for Password or Token
How to disable password request for a Jupyter notebook session?
IOPub data rate exceeded when viewing image in Jupyter notebook
How can I check if code is executed in the IPython notebook?
Link Conda environment with Jupyter Notebook
Error when executing jupyter notebook (No such file or directory)
Conda environments not showing up in Jupyter Notebook
Jupyter notebook not trusted
How to make Jupyter Notebook Matplotlib plot inline?
How do I add Python 3 kernel to Jupyter?
Jupyter Notebook timeout waiting for response in Chrome
How do I increase cell width of Jupyter Notebook in my browser?
IPython notebook won’t read the configuration file
“ImportError: No module named” when trying to run Python script

Thank you for tagging along.

Top comments (0)