Files
CM95/docs/Win11环境安装.md
2026-09-02 09:50:12 +08:00

51 lines
701 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Windows 11 + pyenv 环境安装
已知机器:
- pyenv 已安装
- Python 3.9.2 当前全局默认
- Python 3.12.10 已安装
本项目不要修改全局默认版本,推荐只设置项目 local:
```powershell
cd <项目目录>
pyenv local 3.12.10
python --version
```
必须为:
```text
Python 3.12.10
```
建立虚拟环境:
```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -e .
```
或者直接:
```powershell
.\scripts\setup_env.ps1
```
数据库配置:
```powershell
Copy-Item .env.example .env
notepad .env
```
然后:
```powershell
cm93db env-check
cm93db db-init --create-database
cm93db db-check
```