Install Python Package Without Pip

Install Python Package Without Pip

  1. Install Python Library Without pip Command
  2. Install Python Package With Conda Command

In this article, we will learn how to install a library without pip in Python. We will also learn how to use the conda command to install a package in Python.

Install Python Library Without pip Command

In Python, the pip command is the most often used method for installing open source libraries in our systems. However, there is another way to manually install Python libraries rather than the pip command.

To install a Python library without using the pip command, we need to download and install the package from pypi.org and run the setup.py file with Python.

This section covers the procedures to be followed before installing additional Python packages.

  • Go to Google and search pypi.org, and you will be redirected to the following page.

    python.org website for installing libraries

  • Suppose we want to install python packages SciPy. We will first write it in the search project bar, and press enter.

    Search the package we want to install

  • We will get a list of different libraries and click on the library we want to install, and the first package on the list is the most relevant of them all. Select the first one, scipy 1.9.1, in our case.

    Click on the package

  • Once we click on the required package, we will be redirected to the next page. Click on the download file option to move to the further process of downloading the python package without pip.

    Click on download button

  • Click on the first link of Source Distribution

  • SciPy Installation link

  • Once the installation is completed, we will click on the show in folder to move into the folder where we have installed the zip file.

    Click on show in folder to go to the folder

    Now we are redirected to the folder where the zip file scipy-1.9.1.tar is available.

  • We open the zipped folder and then drag files or folders to a new location to decompress them. We will hold down the zipped folder or click right, choose Extract All, and then follow the on-screen instructions to unzip the whole contents.

    Extracting Files from the zipped folder.

    We have all the files extracted into our system.

    Extracted Folders and files in the system

  • We will open the command prompt as administrator. Use the cd command to navigate our extracted directory.
    cd ['directory']
    
  • Run the setup.py file in Python using the command below.
    python setup.py install
    

The necessary package must then be installed on our system after this. To check if the Python package is installed in the system or not, we open the cmd prompt and import the package we want to check the availability.

import scipy

After this, we will check the version of the package.

scipy.__version__

This shows that scipy is installed in the system.

Scipy version

Install Python Package With Conda Command

We can also install python packages using conda in the cmd prompt.

conda install scipy

Install package with conda command

The conda command installs all the requirements along with packages.

Requirements installation updates

We can now utilize the installed libraries to import into our Python application.

Author: Abid Ullah
Abid Ullah avatar Abid Ullah avatar

My name is Abid Ullah, and I am a software engineer. I love writing articles on programming, and my favorite topics are Python, PHP, JavaScript, and Linux. I tend to provide solutions to people in programming problems through my articles. I believe that I can bring a lot to you with my skills, experience, and qualification in technical writing.

LinkedIn

Related Article - Python Installation

  • Install Python Module Within Code
  • Install Python Pip3 on Mac
  • Install Python on Linux
  • Create requirements.txt in Python
  • Python Default Install Location