docs: require Python 3.10 for obfuscated lib; prefer Ubuntu 22.04
Reject 3.12+ in setup_env to avoid bad marshal data on new servers. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+5
-2
@@ -76,8 +76,10 @@ deploy/
|
||||
|
||||
## 前置条件
|
||||
|
||||
- **Ubuntu 22.04 / 24.04**,用户 **root**
|
||||
- **优先 Ubuntu 22.04**(自带 Python 3.10);24.04 须另装 **python3.10**,不可用系统 3.12
|
||||
- 用户 **root**
|
||||
- 能 `git clone` 仓库到 `/opt/crypto_monitor_user`
|
||||
- 详见 **[docs/ubuntu-server.md](../docs/ubuntu-server.md)**(含 `bad marshal data` 说明)
|
||||
|
||||
---
|
||||
|
||||
@@ -121,7 +123,7 @@ sed -i 's/\r$//' deploy/manage.sh deploy/lib/*.sh
|
||||
|
||||
| 步骤 | 说明 |
|
||||
|------|------|
|
||||
| 检查 Python | 需要 **3.10+** |
|
||||
| 检查 Python | **仅 3.10 / 3.11**(推荐 3.10);优先 `python3.10`;**拒绝 3.12+** |
|
||||
| `crypto_monitor_*` | 各目录 `.venv` + `pip install -r ../requirements.txt` |
|
||||
| `manual_trading_hub` | 独立 `requirements.txt` |
|
||||
| `.env` | 不存在则从 `.env.example` 复制 |
|
||||
@@ -147,4 +149,5 @@ BACKUP_ROOT=/root/backups
|
||||
- 三个监控子项目共用根目录 **[requirements.txt](../requirements.txt)**.
|
||||
- 走 SOCKS 须 **PySocks**(已包含在 requirements 中).
|
||||
- **用户版核心包**(`lib/strategy` 等)为加密发行;本地开发若需重新加密,见 `scripts/obfuscate_release.py`。
|
||||
- **加密包与 Python 版本绑定**:当前发行包按 **Python 3.10** 编译。用 3.12 启动会报 `ValueError: bad marshal data (unknown type code)`。新服务器请用 **Ubuntu 22.04**,或在 24.04 上安装 `python3.10` 后再跑 `setup_env.sh`。
|
||||
- **授权**:配置仓库根 `license.env`(见 `license.env.example`),对接 [https://sq.bz121.com/](https://sq.bz121.com/)。
|
||||
|
||||
Reference in New Issue
Block a user