Skip to content
Related Articles

Related Articles

How install Setuptools for Python on Linux?

View Discussion
Improve Article
Save Article
  • Last Updated : 07 Feb, 2022

Setuptools is a package development process library that extends the Python standard library distutils to make it easier to package Python projects (distribution utilities). It contains the following features:

  • Package and module declarations in Python
  • Metadata from the distribution package
  • Hooks for testing
  • Installation of the project
  • Platform-specific information
  • Support for Python3

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

Installing Setuptools on Linux 

Method 1: Using pip to install Setuptools Package

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

Step 1: Install the current version of Python3 in Linux.

Step 2: Check if pip3 and python3 are correctly installed in your system using the following command:

python3 --version
pip3 --version


Step 3: Upgrade pip3 to avoid errors occurring during the installation process.

pip3 install --upgrade pip


Step 4: Enter the following command to install Setuptools using pip3.

pip3 install setuptools


Method 2: Using to install Setuptools

Follow the below steps to install the Setuptools package on Linux using the file:

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

curl > setuptools-60.5.0.tar.gz


Step 2: Extract the downloaded setuptools package using the following command:

tar -xzvf setuptools-60.5.0.tar.gz


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

cd setuptools-60.5.0
python3 install

Verifying Setuptools installation on Linux 

Use the following import in your Python terminal to verify if the Setuptools installation has been done properly or not:

import setuptools


If we do not get any error while importing the package then is not installed properly.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!