Textualize / rich

Rich is a Python library for rich text and beautiful formatting in the terminal.
https://rich.readthedocs.io/en/latest/
MIT License
49.69k stars 1.73k forks source link

uv Rich Installation error : No executables are provided by rich #3555

Closed kb-cov closed 2 weeks ago

kb-cov commented 2 weeks ago

Hi, I am trying to install Rich using the new uv package manager.....when trying to install I get the following error message:

➜ ~ uv tool install rich Resolved 4 packages in 113ms Installed 4 packages in 36ms

When I try to run it in terminal using uvx I get....

➜ ~ uvx rich .zshrc Installed 4 packages in 33ms The executable rich was not found. warning: Package rich does not provide any executables.

I'm on MacOS Sequoia 15.1 and using latest uv version 0.5.1.....I'm not sure if this is a uv issue or a problem with the Rich package itself. Any ideas what may be causing this error message ?

Thanks...

github-actions[bot] commented 2 weeks ago

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

TomJGooding commented 2 weeks ago

I'm not yet familiar with uv, but I think the problem is that you're trying to install the rich library as a tool?

Tools are Python packages that provide command-line interfaces.

https://docs.astral.sh/uv/concepts/tools/

If you're looking for a command-line interface rather than the library itself, you might want to install rich-cli instead.

kb-cov commented 2 weeks ago

@TomJGooding - you are absolutely right....I have had a total brain dead moment on this....I've been using Rich on the command line for so long (installed via PIPX), I had convinced myself that because the command is actually rich I assumed I needed to install Rich, when in fact I actually needed to install Rich-CLI.....apologies for wasting your time and thank you for pointing out my obvious mistake. As an aside, uv is pretty great so far - have moved from using pyenv, pipx, pip and python's venv module to doing it all in uv and its nice to have all that functionality in one tool....might be worth giving it a go...

kb-cov commented 2 weeks ago

rich-cli now successfully installed through uv....thank you.

github-actions[bot] commented 2 weeks ago

I hope we solved your problem.

If you like using Rich, you might also enjoy Textual