←back to thread

/usr/bin/env -S uv run

(simonwillison.net)
124 points jcbhmr | 2 comments | | HN request time: 0s | source
Show context
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 #
BiteCode_dev ◴[] No.42202778[source]
`--offline` :)
replies(1): >>42202813 #
1. chippiewill ◴[] No.42202813[source]
Except you can't put that in the shebang for the first run
replies(1): >>42202865 #
2. BiteCode_dev ◴[] No.42202865[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.