CLI tools with extra dependencies

You can use uv to install CLI tools in isolated virtual environments. E.g., uv tool install black installs black in an isolated venv. After installing, black will be added to your path and you can use it directly.

When installing tools, you can use the option --with to specify extra dependencies that will be available when you use the CLI tool you are installing. Here are two examples:

  • uv tool install --with pandas --with polars marimo – this installs Marimo and makes sure Pandas and Polars will be available inside Marimo notebooks.
  • uv tool install --with "ruamel.yaml" cogapp – this installs cog, a file generation tool, but makes sure there is a YAML parser available to be used by cog (I use this a lot to build my books).

Improve your Python 🐍 fluency and algorithm knowledge 🎯

Get ready for 12 intense days of problem-solving. The β€œAlgorithm Mastery Bootcamp” starts December 1st and it will feature 24 programming challenges, live analysis sessions, a supportive community of like-minded problem-solvers, and more! Join now and become the Python expert others can rely on.

Previous Post Next Post

Blog Comments powered by Disqus.