Open In App

How to set up Setuptools for Python on Windows?

Last Updated : 31 Jan, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Setuptools is a package development process library that is designed to make packaging Python projects easier by boosting the standard distutils (distribution utilities) library of Python. 

  • It includes Python package and module definitions
  • It includes distribution package metadata
  • It includes test hooks
  • It includes project installation
  • It also includes platform-specific details
  • It supports Python3.

In this article, we will learn how to install Setuptools for Python on Windows.

Installing Setuptools on Windows 

Method 1: Using pip to install Setuptools Package

Follow the below steps to install the Setuptools package on Windows using pip:

Step 1: Install the latest or current version of Python3 in Windows.

Step 2: Now check if pip and python are correctly installed in your system using the following commands.

python –version

pip –version

Checking-python-and-pip-version-in-Windows

Step 3: Upgrade pip to the latest version to avoid errors during installation.

pip install –upgrade pip

Upgrading-pip-in-Windows

Step 4: Enter the following command in the command prompt to install Setuptools using pip.

pip install setuptools

Installing-Setuptools-package

Method 2: Using setup.py to install Setuptools

Follow the below steps to install the Setuptools on Windows using the setup.py file:

Step 1: Download the latest source package of Setuptools for Python3 from here.

curl https://files.pythonhosted.org/packages/9b/be/13f54335c7dba713b0e97e11e7a41db3df4a85073d6c5a6e7f6468b22ee2/setuptools-60.2.0.tar.gz > setuptools-60.2.0.tar.gz

Downloading-the-source-package-for-Setuptools

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

tar -xzvf setuptools-60.2.0.tar.gz

Extracting-the-package

Step 3: Go to the setuptools-60.2.0 folder and enter the following command to install the package.

cd setuptools-60.2.0

python setup.py install

installing Setuptools on Windows using the setup.py file

Verifying Setuptools installation on Windows

Make the following import in your Python terminal to verify if the installation of the Setuptools package has been done properly:

import setuptools 

Verifying-Setuptools-installation

If there is any error while importing the module then the Setuptools package is not installed properly.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads