An overview to Pip — Part 1
Synopsis —
What is Pip?
Pip is python’s package manager — what does it mean?
Well, using python provides built-in modules/ packages that we can easily use and extend the functionality of our code. Some of them already come installed while downloading python’s standard library but for others, we have to download them manually and this is being done with help of Pip.
Other programming languages also have package management systems. For instance — In Java, Maven is a package manager, etc.
Checking pip in your system with version
Open command prompt and type pip
If pip is already downloaded in your system, then it will lead to the above result. Else, first, you have to download it. How to download-Download and install pip Latest Version — GeeksforGeeks
Although, pip comes already installed with python if you have python version above 3.4.
Checking version of Pip-
Installing and Uninstalling Packages-
Firstly, let’s check whether we have pandas already or not- so, there is show command — pip show package name
Pip install package name
More description on show command: — It gives you the version, one-line summary of the package as well as its author, author’s email, homepage, location (in your pc) and its dependencies means what other packages are required in order to function this package. So, for pandas to function -numpy, pytz, python-dateutil are also required. You don’t need to worry because when pandas was installing it remembers what is needed so, it installed its dependencies (other packages) with itself.
Now, maybe you want to uninstall it- simply use — pip uninstall package name
Again, you can go ahead and check with show command, you will find — package(s) not found pandas
Hence, that is how you can install or uninstall any package! But remember if you try to install/uninstall /show a package that doesn’t exist it will throw an error. It is always better to check online whether the package you are typing really exists or not?
List, Upgrade commands:
If you want to check which packages are already present use list command-
For ex: pip list
Now, let’s check if there is any package whose version is outdated:
In order to install the older i.e 2.25.1 version, we need to upgrade it to this version. If we don’t specify a version with an upgrade command then it upgrades the package with the latest version available.
Let’s again get the same version or the latest of requests i.e 2.26.0
Pip help, search commands-
Pip help — pip help basically helps you to find various pip commands –
Let’s search about scrapy now
It also provides you the refer link see — https://pypi.org/search/?q=scrapy
STAY TUNED FOR THE NEXT PART!!! where I am going to cover Requirement.txt, virtual environments, and much more.
Drop in your suggestion. Thanks for reading!