File size: 1,288 Bytes
cfe1a3c
 
 
 
 
fdbc067
 
 
ac60dc3
fdbc067
ac60dc3
af701d0
492d0a0
2a818eb
 
693eb6c
a743ea2
 
492d0a0
ac60dc3
 
 
 
 
 
 
 
 
 
 
 
55c3675
ac60dc3
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
akshare
blis==0.7.11
spacy==3.7.5
gensim
numpy
fastapi
requests
sentencepiece
# 建议锁个合理范围,避免上游突发大版本: transformers>=4.41,<4.45
transformers
uvicorn[standard]==0.35.0
keras==3.6.0
yfinance==0.2.65
jsonpath==0.82.2
tensorflow==2.16.2
pydantic==2.9.2
pydantic_core==2.23.4
nltk
gunicorn

# ---------------- 关键约束:解决你看到的冲突 ----------------
# 1) uvicorn[standard] 会安装 websockets;为兼容 gradio-client 等生态,限制 <13
# websockets>=10,<13

# 2) TensorFlow 2.16.2 需要 protobuf < 5(建议锁到 4.25.x)
protobuf>=4.25.0,<5

# 3) 有些依赖会把 grpcio-status 拉到 1.63+(它要求 protobuf>=5.26.1)→ 与 TF 冲突
grpcio-status<1.63

# 4) 避免在某些平台触发 PyTorch 源码编译(非常耗内存/时间)
--only-binary torch

# ---------------- PyTorch:按平台安装不同版本 ----------------
# Intel Mac(macOS x86_64)只到 2.2.2
torch==2.2.2; platform_system == "Darwin" and platform_machine == "x86_64" and python_version < "3.13"

# Linux / Windows / macOS arm64 → 2.8.0(注意也限制 Python < 3.13)
torch==2.8.0; (platform_system == "Linux" or platform_system == "Windows" or (platform_system == "Darwin" and platform_machine == "arm64")) and python_version < "3.13"