Open In App

How to Install functools32 in Python

Last Updated : 20 Dec, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The Functools is one such module in Python, which is used for higher-order functions i.e., functions that can act on or return other functions. In general, any callable object can be treated as a function for the purposes of this module.

How to install functools32 in Python

The functools32 is a backport of the functools module of Python3.2.3 for use on Python2.7 and PyPy. We can use Python package manager pip to install this module. In Command Prompt (CMD) or PowerShell console, use the following command to install the module. Refer to the following article for more details about functools.

Install functools32 package for Python2

This method is only valid for Python 2.7 version and will show errors in Python3 (as shown in the figure). Thus, we will use a different approach for Python3.

pip install functools32
Install functools32 package for Python2

 

An alternative method to install functools package (for Python3)

We can install the functools32 package manually from the official website on Windows for Python3.

Step 1: Visit the official website (https://pypi.org/project/functools32/

Step 2:  Click on the Download Files option on the left side and then choose functools32-3.2.3-2.tar.gz.

 

Step 3:  Go to the Downloads folder and extract the package.

NOTE:  The package should be extracted to the Python folder which is on the C:\ disk.

Step 4:  Once the package has been extracted, open the CMD terminal and change the directory by setting the path as the location of the extracted folder of functools32.

Step 5:  Finally, execute the setup file present in the functools32 package file by using the following command in the console.

python setup.py install
install functools package (for Python3)

 

Related Articles: Functools module in Python


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads