Python Juypter : Install
31 Mar 2020, 03:21pm TZ +05:30
Jupyter is great tool for Python development. It’s an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. It’s used for data cleaning, scrapping and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more. In-fact, I have already used it in some of my hardware projects.
Let’s Get this installed in our machines. And have some fun !
tl;dr #
|
|
Notebook Server at :
http://localhost:8888/tree
|
|
Notebook Server at :
http://localhost:8888/tree
|
|
Notebook Server at :
http://localhost:8888/treeThough as per the documentation there are many ways specified. I feel directly installing it is better and faster.
Install Jupyter #
Jupyter is available as a Python Package. It can be installed for both Python 3 and it’s older versions.
We are only going to talk about Python 3 - looking towards future.
Let’s make sure we have Python 3 and pip
installed.
Python typically comes already installed for Manjaro
We also need pip
hence the command :
|
|
The installation is similar to Arch Linux.
|
|
You need to have Python3 Installed.
In a Command Prompt
window give the command:
|
|
Note: The Add to PATH
option needs to be checked when installing.
Otherwise the pip
command would not work not the Jupyter installation.
The last command above would install two important pieces.
jupyter
which brings thenotebooks
and all associated web functionality.jupyter_contrib_nbextensions
which provides various addon features
Note(Linux): The sudo
in front of the pip
helps to install the packages to the system.
Create Workspace #
The notebook
provides the interactive front-end and storage of programs.
The Jupyter notebook combines two components:
A web application: It’s a web server where we would be able to do the live code development.
Notebook documents: Its the program storage for the live code from the web application.
Jupyter Notebook documents contains the inputs and outputs of a interactive session as well as additional text that
accompanies the code but is not meant for execution. In this way, notebook files can serve as a complete
computational record of a session, interleaving executable code with explanatory text, mathematics, and
rich representations of resulting objects.
These documents are internally JSON files and are saved with the .ipynb
extension.
Since JSON
is a plain text format, they can be version-controlled and shared with folks.
In order to store these Jupyter Notebook documents we would need to create a workspace.
It’s basically a directory for storing the .ipynb
files.
|
|
|
|
Run Jupyter #
Just make sure you are in the right directory.
Meaning the ipython-notebook
directory.
Use the command
|
|
This should open your default Web Browser window.
In case it does not - Browse the following
http://localhost:8888/treeIn the command line you should see something like:
|
|
This one is for linux systems.
Note: The full token link shown at the end would open your Jupyter Notebook on any web browser.
Epilogue #
Hope that this installation would be useful. I found it mostly by experimentation.
Of course you can get the official documentation of Jupyter there.
Though its now called Jupyter Notebook. It’s due to newer project Jupyter-lab. This new project aims to create a complete online editor with IDE like look-and-feel. Enhancing the original Jupyter Notebook to the next level.
However in my opinion the Jupyter-lab is not stable yet. Hence I don’t recommend it. Also Anaconda side is good. But its very bulky and resource hungry. Go for it - if you only want do Professional Python.
Again its a matter of choice. I believe that being lean and easy is the core of Python.
Possibly its that reason.
Even after 10+ years of me writing the first print
program,
I am still using Python.