Is setuptools
always installed with Python?
I would like to invoke setuptools
at runtime outside of a setup.py
script.
In other words, should I include setuptools
inside my package's requirements.txt
and setup.py
's install_requires
list?
Background
I have noticed when creating a new virtual environment (with Python 3.7.9) that both pip
and setuptools
are installed by default:
python -m venv venv
source ./venv/bin/activate
pip list
Package Version
---------- -------
pip 20.1.1
setuptools 47.1.0
This is documented here: Creating Virtual Environments:
venv is available by default in Python 3.3 and later, and installs pip and setuptools into created virtual environments in Python 3.4 and later.
Even in a vanilla version of Python 3.7.6 (installed via pyenv
), the packages installed by default are both pip
and setuptools
.
Research
Should setuptools be included in setup_requires in Python?
Informs that setuptools
should not be included in setup_requires
, but does not talk about it being included in package requirements for runtime use.