跳转到主要内容
Python · Twisted

可以使用 pyenv + venv 管理多个Python版本和隔离虚拟环境

适用于 Python 3 / Python 3.7.0 最后核对于 2026-07-26推断

确保已经安装Python解释器

$ python3 --version Python 3.7.0

linux/macos 安装

SHELL
# 创建名为 venv 的虚拟环境并激活
$ python3 -m venv venv && source venv/bin/activate

# 安装 domain-admin
$ pip install gunicorn domain-admin

# 启动运行
$ gunicorn --bind '127.0.0.1:8000' 'domain_admin.main:app'

windows 安装

SHELL
# 创建名为 venv 的虚拟环境
> py -3 -m venv venv

# 激活虚拟环境
> venv\Scripts\activate

# 安装 domain-admin
> pip install waitress domain-admin

# 启动运行
> waitress-serve --listen=127.0.0.1:8000 domain_admin.main:app

访问地址:http://127.0.0.1:8000

升级到最新版本

$ pip3 install -U domain-admin -i https://pypi.org/simple