pythonvirtualenvpython-venvuv

What exactly is a "seed package" in Python?


In the context of virtual environments I often see people speaking of "seed packages", e.g. uv venv --seed with help text "Install seed packages (one or more of: pip, setuptools, and wheel) into the virtual environment." or "You can seed pip if you want with uv venv --seed but...", but also in the virtualenv user guide ("[...] install (bootstrap) seed packages (one or more of pip, setuptools, wheel) in the created virtual environment [...]"), without this term ever being clearly defined. Of course, I've got a hunch of what it means, but I've never found a clear definition so far what exactly seed packages are and what exactly "seeding" entails. Can anybody clarify and/or refer to some PEP?


Solution

  • There's no PEP in particular to refer to as far as I know. This is not a Python-specific term and it means nothing special beyond the surface meaning. To seed something is to provide it with what it needs to grow. Think of seed capital, seed data, a random seed, etc.

    A new virtual environment is provided with pip, setuptools, wheel or similar packages, which are required to install or create further packages with which you can build up the environment - what it needs to grow.

    pip allows you to download and install packages from PyPI, setuptools allows you to install, build, package, and distribute Python projects and modules, wheel enables installation of packages in wheel format, they are all specifically intended to allow you to grow the environment.

    The term is mostly a virtualenv term, not so much a true Python term, used since about 2020, and you'll find more of a definition here https://virtualenv.pypa.io/en/latest/user_guide.html#seeders