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:
- Obtaining the files by downloading:
- Visit https://pypi.org and search for the required Python library.
- Open the library’s page and scroll to the Download files section.
- Download the .tar.gz source distribution file.
- Use any unzipping software to unzip the downloaded files if they have been compressed.
- Use the “cd” command to move the current working directory to the file containing “Setup.py”.
- Carefully read the installation instructions and follow the directions for installation.
- 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.
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