How to Install iPython on MacOS?
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
Step 3: Upgrade your pip to avoid errors during installation.
pip3 install --upgrade pip
Step 4: Enter the following command to install iPython using pip3.
pip3 install ipython
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
Step 2: Extract the downloaded package using the following command.
tar -xzvf ipython.tar.gz
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
Verifying iPython installation on macOS:
Enter ipython in the terminal to verify if the installation has been done properly:
ipython
If there is any error then is not installed properly.
Please Login to comment...