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 -
- inbuilt - comes with python does not need explicit installation
- 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')
-
os
: To interact with operating system features such as file system, process management, environment variables. -
sys
: Used for interact the system but focuses on more about python runtime environment and interpreter. -
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
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/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.