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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Install Postgres with Pip in Virtualenv

2 点作者 fforflo27 天前
Hi HN,<p>I frequently work with Postgres &amp; Python and toggle between multiple versions of each. In Postgres, I keep a separate installation for each project, but I don&#x27;t like git submodules and don&#x27;t want to ship &quot;pg_build.sh&quot; scripts with the source code.<p>So, I built pgvenv as a Python shell package that, when installed, triggers a from-source installation of Postgres and installs it at venv&#x27;s prefix. Could become handy at times I think.<p>You can roughly use it like this.<p>python3.11 -m venv .&#x2F;venv<p>source .&#x2F;venv&#x2F;bin&#x2F;activate<p>PGVERSION=17.4 pip install pgvenv --force-reinstall --no-cache-dir<p>initdb .&#x2F;pgdata<p>postgres -D .&#x2F;pgdata<p>Many things can go wrong with this in production, so should probably use for development only.

暂无评论

暂无评论