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
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
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.
Suppose we want to install python packages
SciPy. We will first write it in the
search projectbar, and press Enter.
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.
Once we click on the required package, we will be redirected to the next page. Click on the
download fileoption to move to the further process of downloading the python package without
After clicking on the
Download files, we will see some links. If we want, we can go through them all, but if we want to install the package directly, we can click on the first link from the
Once we click on the link, the installation of the python package SciPy will start without using the
pipcommand. We will get a zip file of it.
Once the installation is completed, we will click on the
show in folderto move into the folder where we have installed the zip file.
Now we are redirected to the folder where the zip file
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.
We have all the files extracted into our system.
We will open the command prompt as administrator. Use the
cd commandto navigate our extracted 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.
After this, we will check the version of the package.
This shows that
scipy is installed in the system.
Install Python Package With
We can also install python packages using
conda in the
conda install scipy
conda command installs all the requirements along with packages.
We can now utilize the installed libraries to import into our Python application.