Open In App

How to Install pytz module on MacOS?

The Pytz module is a module that provides date-time conversion functions to help users serve international customers and supports almost all time zones. It allows us to calculate timezones in Python applications and also allows us to create different types of timezone-aware DateTime instances. In this article, we will explore simple ways to install the pytz module on macOS.

Pre Requisites

Below are some recommended things that you should have for installing the Pytz module on macOS are:



Installing Pytz on MacOS

Installation Using PIP

Users who prefer pip can install the Pytz module on macOS using the following command in the terminal:

pip install pytz



You will get a similar message once the installation is complete.

 

Installation Using Conda

Same as above, Users who prefer conda can install the Pytz module on macOS using the following command in the terminal:

conda install pytz

Enter y when prompted for yes. Once the installation is complete, You will get a similar message.

 

Verifying Pytz Module Installation

To verify that Pytz has been successfully installed on your system, run the following code in the Python IDE of your choice:




import pytz
pytz.__version__

If successfully installed you will get the following output.

 

Article Tags :