[PYTHON] I don't really understand the difference between modules, packages and libraries, so I tried to organize them.

"Module", "package", and "library" are words I often hear, but I didn't really understand the difference, so I looked them up and summarized them. When I was researching, there were many articles that assumed Python, so I will proceed with this article assuming Python as well. It is unclear whether the same theory can be applied to other languages, but I think there is probably something that can be applied.

module

A module is a file created by .py. Save the contents to a .py file when writing a somewhat long program. And when you want to use it, call it as a module with import from another Python file. Of course, the classes and functions stored in the called module can also be used at the callee.

package

A package is a collection of several modules organized into directories. If there are multiple modules with similar functions, it is easier to handle them together. When you call a package with import, you can use the contents of all the modules in the package.

Library

A library is a collection of several packages that can be installed. There are two types of libraries: ** standard library ** that comes with Python and can be used immediately, and ** external library ** that is used after additional installation such as download. "TensorFlow" used in machine learning, Matplotlib used for graph drawing, Pandas (Pandas) that provides functions to support data analysis, etc. are all external libraries.

hierarchy

Library> Package> Module

reference

Thorough explanation of Python modules, packages, and libraries!

Recommended Posts

I don't really understand the difference between modules, packages and libraries, so I tried to organize them.
I tried to find out the difference between A + = B and A = A + B in Python, so make a note
I tried to enumerate the differences between java and python
I didn't understand the Resize of TensorFlow so I tried to summarize it visually.
I tried to graph the packages installed in Python
[Linux] I learned LPIC lv1 in 10 days and tried to understand the mechanism of Linux.
I tried to scrape YouTube, but I can use the API, so don't do it.
I tried to understand how to use Pandas and multicollinearity based on the Affairs dataset.
How to use argparse and the difference between optparse
I want to absorb the difference between the for statement on the Python + numpy matrix and the Julia for statement
I tried to illustrate the time and time in C language
I tried to display the time and today's weather w
I tried to organize SVM.
Understand Python packages and modules
I made my own 3-layer forward propagation neural network and tried to understand the calculation deeply.
[Qiita API] [Statistics • Machine learning] I tried to summarize and analyze the articles posted so far.
I studied about Linux, so I summarized it.
Docker x visualization didn't work and I was addicted to it, so I summarized it!
I studied this! !!
I studied about Systemd properly
I studied about Linux, so I summarized it.
I thought "What is Linux?", So I looked it up.
I don't understand join
PyTorch's book was difficult to understand, so I supplemented it
[For black screen phobia] I want to know about Linux and shells, so I illustrated it loosely.
I don't really understand the difference between modules, packages and libraries, so I tried to organize them.
[Super basics of Python] I learned the basics of the basics, so I summarized it briefly.
[Updated as appropriate] I tried to organize the basic visualization methods
The diagrams were interesting so I tried wrapping them with flask
I investigated the behavior of the difference between hard links and symbolic links
I tried hard to understand Spectral Normalization and singular value decomposition, which contribute to the stability of GAN.
I tried to take the difference of Config before and after work with pyATS / Genie self-made script
I tried to organize about MCMC.
I tried to move the ball
I tried to estimate the interval.
I tried to summarize until I quit the bank and became an engineer
I tried moving the image to the specified folder by right-clicking and left-clicking
[Introduction to Python] What is the difference between a list and a tuple?
I want to separate the processing between test time and production environment
I tried to express sadness and joy with the stable marriage problem.
I tried to learn the angle from sin and cos with chainer
I tried to extract and illustrate the stage of the story using COTOHA
I tried with the top 100 PyPI packages> I tried to graph the packages installed on Python
I tried to understand the decision tree (CART) that makes the classification carefully
I implemented the VGG16 model in Keras and tried to identify CIFAR10
I tried to control the network bandwidth and delay with the tc command
The tree.plot_tree of scikit-learn was very easy and convenient, so I tried to summarize how to use it easily.
(complex) It depends on how to name the coefficient of the morlet wavelet, the appropriate setting value, and the material, so I tried to organize it as much as possible.
I tried to summarize the umask command
I tried to recognize the wake word
I tried to summarize the graphical modeling.
I tried to estimate the pi stochastically
I tried to touch the COTOHA API
I tried to notify the update of "Hamelin" using "Beautiful Soup" and "IFTTT"
I tried to organize the evaluation indexes used in machine learning (regression model)
I tried to process and transform the image and expand the data for machine learning
[LIVE] I tried to deliver the sunrise and sunset times nationwide every day
[Introduction to AWS] I tried porting the conversation app and playing with text2speech @ AWS ♪
I tried to pass the G test and E qualification by training from 50
[No code] I wrote about elliptic curves and blockchain in my thesis, so I tried to summarize the study method.