TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Lazy self-installing Python scripts with uv

11 点作者 defulmere5 个月前

1 comment

d0mine5 个月前
tldr: shebang that runs uv which understands <a href="https:&#x2F;&#x2F;peps.python.org&#x2F;pep-0723&#x2F;" rel="nofollow">https:&#x2F;&#x2F;peps.python.org&#x2F;pep-0723&#x2F;</a> to run Python script with dependencies installed on-the-fly (cached):<p><pre><code> #!&#x2F;usr&#x2F;bin&#x2F;env -S uv run --script # &#x2F;&#x2F;&#x2F; script # requires-python = &quot;&gt;=3.12&quot; # dependencies = [ # &quot;ffmpeg-normalize&quot;, # ] # &#x2F;&#x2F;&#x2F;</code></pre>