How to install Python and Jupyter notebook on MacBook pro.

Biswanath Giri
2 min readNov 7, 2022

--

If you don’t have homebrew installed on your system, follow the steps below Open the Terminal Application of macOS from Application -> Utilities. the terminal will open where you can enter commands

Enter the following command in the macOS terminal

Download and install Homebrew Package Manager

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install the latest Python3 in MacOS

https://www.python.org/ftp/python/3.11.0/python-3.11.0-macos11.pkg

Once you click on downloaded pkg file it will open and click on continue

two times click on continue after that click on install >agree>ask for password will put the laptop login password.

Python install successful in MacBook Pro

Other method to install python

Install Python Latest Version on macOS / macOS X

  • To install python simple open Terminal app from Application -> Utilities and enter following command
brew install python3

Check if pip3 and python3 are correctly installed.

python3 --version
pip3 --version

Upgrade your pip to avoid errors during installation.

pip3 install --upgrade pip

Install Jupyter Notebook using pip3

Notes:-Better to create virtual isolated environment so that we can install multiple python version.

mkdir venv
cd venv
python3 -m venv .

To check what are pip installed if not installed then go for next step

biswanathgiri@192 venv % python3 -m pip freeze
appnope==0.1.3
asttokens==2.1.0
backcall==0.2.0
debugpy==1.6.3
decorator==5.1.1
entrypoints==0.4
executing==1.2.0
ipykernel==6.17.0
ipython==8.6.0
jedi==0.18.1
jupyter_client==7.4.4
jupyter_core==4.11.2
matplotlib-inline==0.1.6
nest-asyncio==1.5.6
packaging==21.3
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
prompt-toolkit==3.0.32
psutil==5.9.3
ptyprocess==0.7.0
pure-eval==0.2.2
Pygments==2.13.0
pyparsing==3.0.9
python-dateutil==2.8.2
pyzmq==24.0.1
six==1.16.0
stack-data==0.6.0
tornado==6.2
traitlets==5.5.0
wcwidth==0.2.5

Create a absolute path with below command

python3 -m venv .

Activate the virtual environment

source bin/activate

biswanathgiri@192 venv % source bin/activate
(venv) biswanathgiri@192 venv %

python3 -V

(venv) biswanathgiri@192 venv % python3 -V
Python 3.11.0
(venv) biswanathgiri@192 venv %

Install jupyter

pip install jupyter

Upgrade pip

pip install — upgrade pip

Jupyter notebook

Directly open local host in laptop

or

copy the link and paste into other new tab to open Jupyter notebook

http://localhost:8889/?token=70e572e7d384093b1a825079b317d42754a4b0874a3d425a

Now Jupyter and python successfully installed on mac book pro

--

--

Biswanath Giri
Biswanath Giri

Written by Biswanath Giri

Cloud & AI Architect | Empowering People in Cloud Computing, Google Cloud AI/ML, and Google Workspace | Enabling Businesses on Their Cloud Journey

No responses yet