Inject Packages
Inject a package
pipx inject adds extra packages into an existing pipx-managed virtual environment. If you have ipython installed and
want matplotlib available inside it:
pipx inject ipython matplotlib
Inject multiple packages at once, from a requirements file, or both:
pipx inject ipython matplotlib pandas
pipx inject ipython -r useful-packages.txt
pipx inject ipython extra-pkg -r more-packages.txt
Expose injected apps
By default, injected packages do not add their entry points to your PATH. Use --include-apps to expose them:
pipx inject ipython black --include-apps
--include-deps exposes entry points from the injected package's dependencies too (implies --include-apps).
Other flags
--force/-freinstalls the package even if it is already injected.--editable/-einstalls the package in editable (development) mode.--with-suffix SUFFIXtargets a suffixed venv (e.g.ipython_3.11).--pip-argspasses extra arguments to pip (e.g.--pip-args='--no-cache-dir').--index-url/-isets the PyPI index URL for this inject.--system-site-packagesgives the venv access to the system site-packages.