Sunday, June 13, 2021

Installing Jupyter Notebook with PIP

After spending years with online office solutions I've felt nostalgic for some desktop number crunching, and I've managed to install Jupyter Notebook on my old desktop with 32-bit Windows 10 and Python 3.8.

It took me some rounds of Internet research to troubleshoot the issues I've gotten during the process, but  doing a couple of ML home-works does not require the latest and greatest client machine. 

For interested visitors: below are the steps.

1. Update your PIP (the package manager is updated frequently, and getting the latest version might prevent certain issues).

pip install --upgrade pip

2. Install "wheel" in order to prevent a possible failure in step (3).

pip install wheel

3. Install the Jupyter Notebook module.

pip install notebook

4. Check the installation, (if you've gotten nonfatal errors during the installation process, the software might work as expected).

jupyter --version

5. Start the notebook server - your notebooks will run in the browser, this is the server module, and its command window indicates its status (be patient until the "home page" gets displayed in a browser tab).

jupyter notebook

6.  The "home page" is a folder view of your local machine, from there you can manage your notebooks, and shut down the notebook server.

7. Adding modules (libraries) to your notebook server, for example "numpy":

A. Create a new notebook or open an existing one.

B. Add a cell, and type in the following command:

%pip install numpy

C. Execute the command (run the cell content) - be patient, the log is displayed only at the end of the installation process.

Execute step (7) whenever you need to add a module, which is not recognized by your Jupiter Notebook installation. For example:

%pip install matplotlib

%pip install pandas

%pip install seaborn

%pip install sklearn

Enjoy the journey!