Original article can be found here (source): Artificial Intelligence on Medium
In my previous blog , I walked you through all steps to run a jupyter notebook. If you’re a data scientist or developer and upgraded to macOS Catalina 10.15, then you might have faced some issues with jupyter notebook.The latest version of Mac Catalina functionality is different than the previous s version. Follow below steps to configure and run jupyter notebook.
Download the installer. In your terminal window or Anaconda Prompt. If you are on macOS Catalina, the new default shell is zsh.
We will go through each step one by one configure jupyter notebook.
Anaconda Download Mac Catalina; Anaconda Download For Macbook Air. The Mac OS X Anaconda installation comes only in one form: 64-bit. Before you can perform the install, you must download a copy of the Mac software from the Continuum Analytics site. The following steps help you install Anaconda 64-bit on a Mac system. To uninstall Anaconda, you can do a simple remove of the program. This will leave a few files behind, which for most users is just fine. If you also want to remove all traces of the configuration files and directories from Anaconda and its programs, you can download and use the Anaconda-Clean program first, then do a simple remove.
Step I : Install the anaconda distribution.
MacOS Catalina is the latest Mac Computer Operating system released by Apple Inc. To install macOS Catalina on any Mac Computer or Mac Laptop you need to download the macOS Catalina DMG File. Which is free to download from Apple official website, but for that, you need to have a developer account. I want to install pip for python 2.7 on my Mac. I think this is the python located in /usr/bin/python. Unfortunately I have already installed Anaconda, which installs python 3.6.3, and changes things so that the command python xxx.py automatically runs xxx.py using python 3.6.3.
The preferable way to go forward is to use command line installer instead of graphic . Use this link to download CLI https://repo.anaconda.com/archive/Anaconda3-2020.02-MacOSX-x86_64.sh
Anaconda Download Mac Os Catalina Installer
Once downloaded ,go to terminal and run
I will be using python3 as python2 is not much in use now a days.
To start the installation run below command in your terminal.
Instead of Downloads use the path where you have install anaconda distribution and replace Anaconda3–2020.02-MacOSX-x86_64.sh with your filename.
You need to press Enter here ,
Read the license agreement and scroll to bottom
Enter yes. Next it will ask for location to install.
Press Enter .
Once you press enter , message props “Do you wish the installer to initialize Anaconda3 by running conda init?”
Anaconda Python Mac
Enter Yes
The default shell for Catalina is zsh so our next step will be to install Zsh
Step II :Set-up macOs Terminal with Zsh
For Catalina
First set-up Xcode command-line tools, also known as xcode-select
If there is some issue try running below script.
Then you need to install software package management system for macOS i.e Homebrew.
Run the below command
Next step is to install default shell for Catalina ,i.e zsh.
Now we need to integrate zsh in iterm2. If you are not having iterm2 ,install it using brew.
For zsh — iterm2 integration ,
Step III :Conda ,Pip and Jupyter installation
Conda can be installed using brew
Update conda to latest version
For pip you can either use conda or easy install
Conda way
Easy install way
For nbextensions run following command
Lastly for jupyter use brew
Step IV :Creating Virtual environment and link it to ipykernel
To create a virtual environment pass the name of environment with python version to be used. Suppose we name our environment as cat and want to use python 3.8.2 version.
Activate the environment
Install ipykernel
Link kernel to virtual environment.
If you want to display the name of environment say “Cat_Virtual”
Go to iterm2 and run
Open any notebook , it will appear like this,
Enjoy 😊 !!