How to 'pipx inject' in uv

- 1 min read

Series: TIL

Have you ever used pipx inject? It is the command to install a package into an existing pipx-managed virtual environment1.

Pipx inject

Let’s say you have installed the IPython interactive shell via pipx install ipython but now you want to use pandas to do some data wrangling.

$ ipython
In [1]: import pandas as pd

importing pandas returns ModuleNotFoundError

To fix this, let’s install pandas into the ipython environment:

pipx inject ipython pandas

Now we are good to go!