Python is famous for having many package and environment managers.
pipis the default, index: PyPI (python package index)condaalso does other language dependencies, index: Anaconda Repo, conda-forge Python environment is a directory with:
- Binaries in
bin: interpreter - Standard lib in
lib - 3rd party packages in
site-packages- when you are making a python package you also
You can
{python}importpackages (directory) or modules (single file)
- when you are making a python package you also
You can
- Python packages have directory structures under
mypackagepyproject.tomlorsetup.py: package name & build configurationsrc/mypackage__init__.pyis required to make it a package__main__.pyis optional, allows running bypython -m mypackage./subpackageto be imported like{python}import mypackage.subpackage
- Python modules are the single file
mymodule.pyanc imported{python}import mymodule