030.00 a
Description: This article about pip module name convention hypen and underbar. Start by thinking about package names and usage differences in pip. The filename is usually called kebab format and can be hyphenated for SEO considerations in the URL. When using modules, you must use underbars according to the development language conditions.
#000#IT_Knowledge#030#Package#030.00#PIP#030.00 a#pip_name_and_module_name
Why does the pip package use hyphens when installing and underbars when using?
Why does the pip package use hyphens when installing and underbars when using?
Audience
Someone wanted to clarify the difference between pip package naming and the associated hypen underbar.
Overview
When installing, naming rule is affected by PyPI So there's no hard policy enforcement. So for SEO, or search, we generally hyphenate
When using,naming rule is affected by python interpreter, The naming policy is strictly enforced. So you can't use hyphen.
Content
All mentioned in Overview
Conclusion
When using the package as a module, the underbar is enforced, but when installing it, you are free to do so and usually use hyphens for SEO purposes. Since it's free, hyphens are also allowed in package names.
PIP commands
pip version upgrade command
pip install --upgrade pip
download packages to current directory by editor mode from setup.py
pip install -e .
setup VS requirements
setup.py
is sigle package but more detailed config and
requriements.txt
many packages but almost only control version?