How do I set uv to index packages from a local directory?

23 hours ago 1
ARTICLE AD BOX

So, I have a built python wheel at $HOME/mypackages/mypackage-1.0.0-py3-none-any.whl. I want uv to use this mypackages/ directory as its default package index, so I set:

export UV_DEFAULT_INDEX="$HOME/mypackages"

Then I try to use the package with,

uvx -w mypackage python

But, it fails as follows:

× No solution found when resolving tool dependencies: ╰─▶ Because mypackage was not found in the package registry and you require mypackage, we can conclude that your requirements are unsatisfiable.

Installing the package directly with pip works as expected, so it is not a problem with the package itself.

Read Entire Article