logoalt Hacker News

bryanlarsentoday at 2:30 AM3 repliesview on HN

How do people install stuff like this? So many tools these days use `npm install` or `pip install`. I certainly have npm and pip installed but they're sandboxed to specific projects using a tool like devbox, nix-devshell, docker or vagrant (in order of age). And they'll be wildly different versions. To be pedantic `pip` is available globally but it throws the sensible `error: externally-managed-environment`

I'm sure there's a way to give this tool it's own virtualenv or similar. But there are a lot of those things and I haven't done much Python for 20 years. Which tool should I use?


Replies

mjfishertoday at 7:25 AM

I tend to use things like pyenv or nvm; they keep python and node versions in environments local to your user, rather than the system.

`pip install x` then installs inside your pyenv and gives you a tool available in your shell

rrvshtoday at 6:58 AM

tbh copy paste the github link and ask an agent for a nix package. you may have to do some prompt engineering but usually done in less than 10 ish mins

misnometoday at 2:35 AM

uv tool install

Installs into an automatic venv and then softlinks that executable (entry-points.console_scripts) into ~/.local/bin. Succeeds pipx or (IIRC) pipsi.