In this video by Quordnet Academy how to use Pip in Python have been discussed.
If you want to find out more about Python tutorial for Beginners and learn python programming, PLEASE click to get the full playlist: 👉
• Python Tutorial for Beginners
What is pip?
pip is the standard package manager for Python. We can use pip to install additional packages that are not available in the Python standard library. For example,
pip install numpy
If we had installed pip on our system, this command would have installed the numpy library.
How to install pip?
pip comes pre-installed on the Python versions 3.4 or older. We can check if pip is installed by using the following command in the console:
pip --version
If pip is already available in the system, the respective pip version is displayed, like:
pip 19.3.1 from C:\Python37\lib\site-packages\pip (python 3.7)
If we are using an older version of Python or do not have pip installed for some other reason, follow the steps as described in this link: pip installation
Using pip
pip is a command-line program. After its installation, a pip command is added which can be used with the command prompt.
Most of these packages are officially hosted and published to the Python Package Index(PyPI). pip allows us to download and install these packages.
Basic Package Installation
The install command used to install packages using pip. Let's take an example:
Suppose we want to install requests, a popular HTTP library for Python. We can do it with the help of the following command.
pip install requests
Listing Installed Packages with pip
The pip list command can be used to list all the available packages in the current Python environment.
pip list
Output
Package Version
---------- ----------
certifi 2019.11.28
chardet 3.0.4
Package Information with pip show
The pip show command displays information about one or more installed packages. Let's look at an example:
Here, the show command displays information about the requests library. Notice the Requires and Required-by column in the above output.
Requires column shows which dependencies the requests library requires. And, Required-by column shows the packages that require requests.
Uninstalling a Package with pip
We can uninstall a package by using pip with the pip uninstall command.
Suppose we want to remove the requests library from our current Python environment. We can do it in the following way:
pip uninstall requests
Output
Uninstalling requests-2.22.0:
Would remove:
C:\Python37\lib\site-packages\requests-2.22.0.dist-info\*
C:\Python37\lib\site-packages\requests\*
Proceed (y/n)? y
Successfully uninstalled requests-2.22.0
As we can see, the requests package is removed after the final prompt.
Note: Even though the specified package is removed, the packages that were installed as dependencies are not removed. In this case, the dependencies (chardet, urllib3, and certifi) of the requests library aren't uninstalled.
If we need to remove the dependencies of a package as well, we can use the pip show command to view installed packages and remove them manually.
Using Requirement Files
A file containing all the package names can also be used to install Python packages in batches.
Let's take a look at an example:
Suppose we have a file requirements.txt which has the following entries:
numpy
Pillow
pygame
We can install all these packages and their dependencies by using a single command in pip.
Possibly if you have doubt comment below and let me understand what else I can help you with.
To never miss an update from or channel hit the subscribe button first and if already subscribe hit the bell icon.
1.Follow us on INSTAGRAM for Interesting posts
/ quordnet_academy
2.Follow us on LINKEDIN for interesting content on different aspects
/ quordnet-academy
3.Don't forget to like our FACEBOOK to get the most out of it
/ quordnetacademy
4.Follow us on twitter to get a mix of all
/ quordnetacademy
5.If you want to get us on TUMBLR please then click on the link given below
https://www.tumblr.com/blog/quordnet-...
6.Do join our OFFICIAL Telegram for notes of different things
https://t.me/quordnet
7.For get job update regularly both private and government do join this telegram channel
https://t.me/quordnetforjobs
++++++++++++++++++++++
Now that you have viewed my YouTube video about Python tutorial for Beginners has it assisted?
Please 'like' the video to assist other people searching for python tutorial for beginners step by step or python tutorial 😇 .
This course was made and developed by:
https://www.udemy.com/user/scott-cose...
#Quordnet_Academy, #python_tutorial, #PIP,#udemy_course_for_free
Nesta página do site você pode assistir ao vídeo on-line Python Tutorial 10 : Pip duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Quordnet Academy 02 Agosto 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 52 vezes e gostou 0 espectadores. Boa visualização!