Getting Started (Again)

With the new year, there is the inevitable looking back and looking forward. One of the things that I have realized is that I would like to start writing and publishing more. This is not a New Year’s resolution — those rarely work for me. Rather, this is a commitment I making to myself to start writing every day and to publish something at least once a week. That seems like a reasonable goal. I am curious to see where I stand six months from now.

By the way, my theme for this year (thanks GCP and Myke) is “Engage”. The word conjures images of Captain Picard telling his crew to enable the warp drive on the Enterprise. I like how simple it sounds but appreciate all the effort that goes behind such a simple order. With one word, Picard puts in motion all the actions and systems it takes to move a giant starship across the far flung reaches of space. If he can do that with a single word, surely I can make some changes and improvements in my life. Engage, indeed.

Installing JupyterLab on a Mac

Today I ran into a minor challenge getting JupyterLab installed on my Mac. I’m running Mac OS Catalina so your mileage may vary. The following are few items I ran into and the steps I followed to get JupyterLab setup and running. I’m sure I am way behind the curve of most InfoSec and IT types who do this kind of stuff in their sleep. But just in case there is someone else out there who does not know how to get started with JupyterLab on their Mac, I present the following:

  • The version of Python baked into Mac OS is old and not supported by pip (I think it’s Python 2.7x).
  • The error message I got when I ran

pip install jupyterlab

  • was the following:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020.

  • So installed Python 3.8 from https://python.org – no problems there.
  • I then ran the following to make sure pip was installed in this instance of Python:

sudo -H python3 -m ensurepip

and the following was returned:

Looking in links: /tmp/tmp4m5ghja

Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (41.2.0)

Requirement already satisfied: pip in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (19.2.3)

  • So I knew that I had a functioning pip in my Python 3 environment – so far so good.
  • Last step was to use pip to do the install:

python3 -m pip install jupyterlab

  • I saw a long list of modules/apps downloaded and installed thanks to pip magic:

Collecting jupyterlab

Downloading https://files.pythonhosted.org/packages/35/9a/6e81535ed42ad01ec2a5e8f9e0419108f60fab36e48dc1168fa5e0576a81/jupyterlab-1.2.4-py2.py3-none-any.whl (6.4MB)

     |████████████████████████████████| 6.4MB 1.0MB/s 

Collecting tornado!=6.0.0,!=6.0.1,!=6.0.2 (from jupyterlab)

  Downloading https://files.pythonhosted.org/packages/30/78/2d2823598496127b21423baffaa186b668f73cd91887fcef78b6eade136b/tornado-6.0.3.tar.gz (482kB)

     |████████████████████████████████| 491kB 53.0MB/s 

(much more followed…)

  • After the install was completed I just ran the following to start up JupyterLab:

jupyter lab

  • My default web browser (Safari) popped up with the JupyterLab environment ready to go (http://localhost:8888/lab). Success!