Skip to main content

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. 

Comments

Popular posts from this blog

JavaScript Functions

  Hi there, and welcome to another exciting lesson on JavaScript. If this is your first time here, please do well to check out our previous lessons. In the previous lesson, we were discussing JavaScript math methods. It was very intuitive as we got to learn how to use the various math methods. To proceed, we shall be looking at JavaScript functions.  A function in JavaScript like in every other programming language could be defined as a block of code that is written to perform a particular task, and this function is usually invoked or called before it is being implemented. We have been talking about methods throughout the previous lessons right. Do you know that those methods are actually functions? Yes they are functions. You can now have an overview of the importance of functions in every programming language. How do we create a function in JS? To create a function, you follow the format function functionName(Argument) {//Block of code }. Some functions do have a return val...

JavaScript Math Methods

Hello everyone, and welcome to another exciting JavaScript lesson. In the last lessons you have been seeing other methods being used in JS (for example, the string methods). We shall go further into exploring other methods. This time, it’s going to be math methods. Do not move an inch because it’s going to be a very exciting. Before we look at what a math method is, let’s have an overview of math objects. A math object in JavaScript is a static built-in object that includes properties and methods used in performing mathematical tasks. Talking about math properties, they have the syntax Math.property . Some examples are Math.E that returns Euler’s number, Math.PI that returns PI, Math.LN2 that returns the natural logarithm of 2, and many others. The various JavaScript methods contained in the math object, thus, make mathematical operations easier and reduce effort as well as time in math-oriented programming. Some JS methods include abs( ), ceil( ), cos( ), sqrt( ), pow( ), log( ) ...

How to generate random numbers using NumP1

Hello. Welcome to another edition on this platform. For more better understanding, do checkout our YouTube channel to get the video tutorial. In this article of today, we are going to see how to generate random numbers using any of the following methods: Generating a random number Generating a random float and integer Generating random number arrays Generating random number from an array What is a random number? This is a number which cannot be predicted before its occurrence. This number might not different every time. Programmatically, they are two categories of random numbers:     Pseudo-Random numbers       True Random numbers. Just as programs which are written by programmers are a set of instructions, we must follow an algorithm to generate random numbers. Random numbers which are generated using an algorithm are called Pseudo-Random numbers. To generate a true random number, it is important to get the data from sources such as the keyboards, mou...