2. Modules & Pip : Python

Modules & Pip

Modules & Pip in Python


Now and again we need to utilize another person's code in our program since it saves us a ton of time. Today, we will get familiar with a method to utilize code that isn't composed by us yet will improve the nature of our program, save us time and energy, and obviously, it is legitimate and free. 


Module - It is a record that contains meanings of a few capacities, classes, factors, and so forth, which is composed by another person for us to utilize. 

  • Built-in Modules - These are pre-introduced in Python, i.e., there is no compelling reason to download them. These modules accompany the python translator itself. 
  • External Modules - These are the modules that are not pre-introduced in Python, i.e., we want to download them before utilizing them in our program. 


Pip - It is a bundle administrator for Python, i.e., pip order can be utilized to download any outside module in Python. It is something that assists us with getting code composed by another person. 


We can introduce a module in our framework by utilizing the pip order

  • Open cmd or Powershell in your framework. 
  • And afterward, type pip introduces module_name and press enter. 
  • When you do that, the module will begin downloading and will introduce consequently on your PC. 


In the wake of introducing any module in Python, you can import it utilizing "import module_name" into your Python program.

Post a Comment

0 Comments