Open In App

How to Install iPython on MacOS?

Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will learn how to install iPython in Python on MacOS.

IPython is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.

Installation:

Method 1: Using pip to install iPython

Follow the below steps to install the iPython package on macOS using pip:

Step 1: Install the latest Python3 in MacOS

Step 2: Check if pip3 and python3 are correctly installed.

python3 --version
pip3 --version

checking python and pip version in macos

Step 3: Upgrade your pip to avoid errors during installation.

pip3 install --upgrade pip

upgrading pip in macos

Step 4: Enter the following command to install iPython using pip3.

pip3 install ipython 

installing ipython package on macOS using pip

Method 2: Using setup.py to install iPython 

Follow the below steps to install iPython package on macOS using the setup.py file:

Step 1: Download the latest source package of iPython for python3 from here.

curl https://files.pythonhosted.org/packages/46/80/3942535e9c1025d4b379c447a0606bfbe140b25dc331d34910cf2f5e76c0/ipython-7.27.0.tar.gz > ipython.tar.gz

downloading the source package for iPython in macos

Step 2: Extract the downloaded package using the following command.

tar -xzvf ipython.tar.gz

extracting the ipython.tar.gz file in macos

Step 3: Go inside the folder and Enter the following command to install the package.

Note: You must have developer tools for XCode MacOS installed in your system

cd ipython-7.27.0
python3 setup.py install

installing iPython on macOS using the setup.py file

Verifying iPython installation on macOS:

Enter ipython in the terminal to verify if the installation has been done properly:

ipython

Verifying iPython installation on macOS

If there is any error then is not installed properly.


Last Updated : 21 Sep, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads