The most common practice of installing external libraries in your system is by using the Python pip command. However, there is an alternate method of manually installing Python libraries without using the pip command.
In this article, we are going to discuss how to manually install a python package.
Below is the Step-by-step approach to manually install selenium library in a system.
Step 1: Downloading the files
- Go to the https://pypi.org/ website find the package you want to install
- From the menu on the left-hand side click the download files button.
- Here I have taken the example of the selenium library.
- Make sure to download .tar.gz file
Step 2: Unzip the files downloaded if they are zipped using any unzipping software.
Step 3: Change the current working directory to the file containing Setup.py using the cd command.
Step 4: Read the installation instructions carefully and install as directed.
Step 5: After changing the current working directory to the file containing Setup.py type the following command:
python setup.py install
That’s it, now you are ready to use the installed library and you can import this library in your python program.