Python venv + pip Cheat Sheet/Install from a source tarball

Install a local source distribution file.

Section: Editable and local installs

Install from a source tarball

bash
bash
python -m pip install dist/my_package-0.1.0.tar.gz
Explanation

Useful when validating source distribution packaging.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Editable and local installs
Install from a wheel file
Install a local built wheel into the venv.
OpenIn sheetbashsame section
Editable install of current project
Install the current project in editable mode.
OpenIn sheetbashsame section
Editable install with extras
Install development extras from pyproject or setup metadata.
OpenIn sheetbashsame section
Install a requirements file
Install project dependencies from requirements.txt.
OpenIn sheetbash1 tag match
Install only from a local wheelhouse
Install using local artifacts and no package index.
OpenIn sheetbash1 tag match
Install without dependencies
Install a package while skipping dependency resolution.
OpenIn sheetbash1 tag match