Day 4: Modules and pip in python

modules

In programming modules or library are pre-written code helps you do specific task. Modules are very optimize, powerful and written by experts.

There are 2 types of modules –

inbuilt – comes with python does not need explicit inst…


This content originally appeared on DEV Community and was authored by aryan015

modules

In programming modules or library are pre-written code helps you do specific task. Modules are very optimize, powerful and written by experts.

There are 2 types of modules -

  1. inbuilt - comes with python does not need explicit installation
  2. external - require installation

pip

pip is a package installer in python. It comes along with python installation does not require explicit download.

# syntax for both mac and windows
# you need active internet connection to download external packages
pip install package-name
# preview
pip install pandas

note: If you are coming from javascript background then you might have heard of npm. pip is python version of npm. along with it we have pipx which execute packages without downloading them. Saves space but require internet connection to use it everytime.

important internal libraries

Using below command you can see all the in-built modules.

python 
help('modules')
  1. os: To interact with operating system features such as file system, process management, environment variables.
  2. sys: Used for interact the system but focuses on more about python runtime environment and interpreter.
  3. math: A module to solve math problems like power, log, trigonometry.

complete index🧡

Please follow me I you like my content🧡
my linkedin
website


This content originally appeared on DEV Community and was authored by aryan015


Print Share Comment Cite Upload Translate Updates
APA

aryan015 | Sciencx (2024-07-19T12:31:34+00:00) Day 4: Modules and pip in python. Retrieved from https://www.scien.cx/2024/07/19/day-4-modules-and-pip-in-python/

MLA
" » Day 4: Modules and pip in python." aryan015 | Sciencx - Friday July 19, 2024, https://www.scien.cx/2024/07/19/day-4-modules-and-pip-in-python/
HARVARD
aryan015 | Sciencx Friday July 19, 2024 » Day 4: Modules and pip in python., viewed ,<https://www.scien.cx/2024/07/19/day-4-modules-and-pip-in-python/>
VANCOUVER
aryan015 | Sciencx - » Day 4: Modules and pip in python. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/19/day-4-modules-and-pip-in-python/
CHICAGO
" » Day 4: Modules and pip in python." aryan015 | Sciencx - Accessed . https://www.scien.cx/2024/07/19/day-4-modules-and-pip-in-python/
IEEE
" » Day 4: Modules and pip in python." aryan015 | Sciencx [Online]. Available: https://www.scien.cx/2024/07/19/day-4-modules-and-pip-in-python/. [Accessed: ]
rf:citation
» Day 4: Modules and pip in python | aryan015 | Sciencx | https://www.scien.cx/2024/07/19/day-4-modules-and-pip-in-python/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.