How to Install Python 3 Libraries Without Using pip

July 22, 2024 / Web Design & Development

This article explains how to install Python 3 libraries without using the pip command. Using the Python 3 pip command is the most popular method for installing external libraries on your system. Nevertheless, installing Python 3 libraries manually can also be done without the pip program.

Let us follow the method:

  1. Obtaining the files by downloading:
    1. Visit https://pypi.org and search for the required Python library.
    2. Open the library’s page and scroll to the Download files section.
    3. Download the .tar.gz source distribution file.
  2. Use any unzipping software to unzip the downloaded files if they have been compressed.
  3. Use the “cd” command to move the current working directory to the file containing “Setup.py”.
  4. Carefully read the installation instructions and follow the directions for installation.
  5. Type the following command after modifying the directory containing setup.py as the current working directory:
    python setup.py install

This completes the installation of the library, which you may use by importing it into your Python 3 program. Hope you grasped everything well.

Managing Python environments and packages?
Get full control over your setup with a Linux VPS solution.

To install and switch Python versions on Ubuntu 22.04, see our guide on How to Install and Switch Python Versions on Ubuntu 22.04

Spread the love