python package manager

python package manager

Hi guys. Welcome back to another tutorial on python. If you are new here, please do checkout our previous tutorials on python and also do checkout other programming languages. Also subscribe to our YouTube channel to get the video tutorials.

Today we are going to look at another interesting section in python called pip also known as python package manager.

  • In this article you will learn about:
  • What is pip and a package?
  • How to check if pip is installed in a system and install pip if it is not installed in a system
  • How to install packages
  • Using and finding packages
  • Uninstalling a package
  • List all the packages install

Let’s get started by knowing what is pip and a package

What is pip?

It’s a package manager for python which allow a user to install manage packages additional python packages that are not available in the python standard library.

What is a package?

A package is a directory containing multiples modules (a collection of python files) and other sub-packages

How to check if pip is installed

Go to your command prompt by typing cmd into the search bar in the start menu. In the command line, type the following “py -m pip –version”

OUTPUT

python package manager

Installing pip

If pip is not installed in your computer, you can download pip from this website: https://pypi.org/project/pip/.

How to install python package.

Installing packages in python is matter of simple steps. 

Let’s use the case where we want to install Django (one of python modules), here are the simple steps we have to follow:

Open the command and tell pip that you want to download to Django.

python package manager

After that you press enter and pip will start downloading the Django package

python package manager

Finding more packages

They are many packages in python. Here is a website where we can get the packages, we want in pythonhttps://pypi.org/project/pip/. 

Uninstalling a package

To uninstall a package requires some few steps. 

When we installed a package, we install some other some other pip dependencies. In this case we run the show command to check that the dependencies are not depended on other python packages. Once this is done and you have confirmed the package you want to remove, you can now use the pip uninstall command.

Let’s take an example where we want to remove the Django package

python package manager

Always remember to check the dependencies when you want to remove a package. Removing dependencies being used by other package will break your applications. These dependencies are removed manually

List packages

To list all the installed packages in your system, we use the pip list command list them.

Example

python package manager

OUTPUT

python package manager

Those are the packages which are installed in my operating systems.

Pip is very important as it helps install many python packages. Some of these packages are python-based web frames which are used to build web applications. Have a nice time coding. 

Ask Question #trycoder
Facebook Page👉 https://bit.ly/3o688OF
Watch more videos here
Click to SUBSCRIBE to more Videos!

Please Like, Comment, Share and Subscribe THANK YOU!

0 Comments