←back to thread

/usr/bin/env -S uv run

(simonwillison.net)
124 points jcbhmr | 5 comments | | HN request time: 0.805s | source
1. smaddox ◴[] No.42201103[source]
I've been using this for a few weeks now, and it's really handy. But I did learn the hard way that it fails if you don't have internet connection, even if you already have the venv cached.
replies(2): >>42202309 #>>42202778 #
2. usrme ◴[] No.42202309[source]
That's really unexpected! I'd default to the assumption that it would "just work" if all the dependencies are already met.
3. BiteCode_dev ◴[] No.42202778[source]
`--offline` :)
replies(1): >>42202813 #
4. chippiewill ◴[] No.42202813[source]
Except you can't put that in the shebang for the first run
replies(1): >>42202865 #
5. BiteCode_dev ◴[] No.42202865{3}[source]
True, for servers you can't warm up, shiv is your best bet: https://shiv.readthedocs.io/

Or points to your own private pypi instance with --index-url.