Open In App

How to Install pytz module on MacOS?

Last Updated : 18 Oct, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

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:

  • Python
  • PIP or Conda (Depending upon user preference)

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.

Installing-pytz-using-pip

 

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.

Installing-pytz-using-conda

 

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:

Python3




import pytz
pytz.__version__


If successfully installed you will get the following output.

Verifying-pytz-module

 


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads