Skip to content

Commit 32eae0e

Browse files
author
User
committed
解决依赖不兼容的问题
1 parent b1763da commit 32eae0e

1 file changed

Lines changed: 51 additions & 30 deletions

File tree

requirements.txt

Lines changed: 51 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,80 @@
11
# 核心框架
2-
fastapi>=0.104.0,<0.116.0
3-
uvicorn[standard]>=0.24.0,<0.32.0
4-
pydantic>=1.10.0,<2.0.0
5-
python-dotenv>=1.0.0
6-
requests>=2.31.0
2+
# 注意: 根据镜像源可用版本调整,最高版本为 0.83.0
3+
fastapi>=0.68.0,<=0.83.0
4+
# 注意: 镜像源中 uvicorn 最高版本为 0.17.0
5+
uvicorn[standard]>=0.13.0,<=0.17.0
6+
# FastAPI 0.83.0 需要 pydantic>=1.6.2,<2.0.0
7+
pydantic>=1.6.2,<2.0.0
8+
# 注意: 镜像源中 python-dotenv 最高版本为 0.20.0
9+
python-dotenv>=0.15.0,<=0.20.0
10+
# 注意: 镜像源中 requests 最高版本为 2.27.1
11+
requests>=2.20.0,<=2.27.1
712

813
# LLM和LangChain
9-
# 注意: langchain版本范围较宽,建议使用更具体的版本
10-
openai>=1.12.0,<2.0.0
11-
langchain>=0.1.0,<0.2.0
12-
langchain-openai>=0.1.0,<0.2.0
13-
langchain-core>=0.1.0,<0.2.0
14-
langchain-community>=0.0.20,<0.2.0
14+
# 注意: 根据镜像源可用版本调整
15+
# openai 0.9.0+ 需要 pandas>=1.2.3,但镜像源 pandas 最高只有 1.1.5
16+
# 使用 openai 0.8.0 以避免 pandas 版本冲突
17+
openai>=0.8.0,<=0.8.0
18+
# 注意: langchain 0.0.x 版本可能与新版本 API 不兼容,需要检查代码兼容性
19+
langchain>=0.0.20,<=0.0.27
20+
# 添加 pandas 依赖(openai 可能需要,使用镜像源可用版本)
21+
pandas>=1.0.0,<=1.1.5
1522

1623
# 向量数据库
17-
chromadb>=0.4.22,<0.5.0
18-
sentence-transformers>=2.2.2
24+
# 注意: 镜像源中可能没有 chromadb,需要从其他源安装或使用替代方案
25+
# chromadb>=0.4.22,<0.5.0
26+
# 如果镜像源没有,可以尝试: pip install chromadb --index-url https://pypi.org/simple
27+
# 注意: 镜像源中 sentence-transformers 最高版本为 2.2.2
28+
sentence-transformers>=2.0.0,<=2.2.2
1929

2030
# 数据库
21-
PyMySQL>=1.1.0
31+
# 注意: 镜像源中 PyMySQL 最高版本为 1.0.2
32+
PyMySQL>=1.0.0,<=1.0.2
2233
sqlalchemy>=1.4.53,<2.0.0
23-
alembic>=1.12.1
34+
# 注意: 镜像源中 alembic 最高版本为 1.7.7
35+
alembic>=1.5.0,<=1.7.7
2436

2537
# 文档处理
26-
pypdf>=3.17.4
27-
python-multipart>=0.0.6
38+
# 注意: 代码中使用 PyPDF2,已移除 pypdf 以避免冲突
39+
# 注意: 镜像源中 python-multipart 最高版本为 0.0.5
40+
python-multipart>=0.0.1,<=0.0.5
2841

2942
# 依赖冲突修复
3043
idna>=2.8
3144
anyio>=3.0.0
3245

3346
# 多模态功能依赖
3447
# 语音识别和合成
35-
openai-whisper==20231117
48+
# 注意: 镜像源中没有 openai-whisper,需要从其他源安装
49+
# openai-whisper==20231117
50+
# 如果镜像源没有,可以尝试: pip install openai-whisper --index-url https://pypi.org/simple
3651
pydub==0.25.1
37-
noisereduce==3.0.0
38-
librosa==0.10.1
39-
soundfile==0.12.1
52+
noisereduce>=3.0.0,<=3.0.3
53+
# 注意: 镜像源中 librosa 最高版本为 0.9.2
54+
librosa>=0.9.0,<=0.9.2
55+
soundfile>=0.12.0,<=0.13.1
4056

4157
# 图像处理和分析
42-
Pillow==10.0.1
43-
opencv-python==4.8.1.78
44-
deepface==0.0.79
58+
# 注意: 镜像源中 Pillow 最高版本为 8.4.0
59+
Pillow>=8.0.0,<=8.4.0
60+
opencv-python>=4.8.0,<=4.12.0.88
61+
deepface>=0.0.79,<=0.0.86
4562
face-recognition==1.3.0
46-
pytesseract==0.3.10
63+
# 注意: 镜像源中 pytesseract 最高版本为 0.3.9
64+
pytesseract>=0.3.0,<=0.3.9
4765

4866
# 阿里云SDK
49-
aliyun-python-sdk-core==2.14.0
50-
aliyun-python-sdk-nls-cloud-api==1.0.0
51-
aliyun-python-sdk-imageprocess==1.0.0
52-
aliyun-python-sdk-ocr==1.0.0
67+
aliyun-python-sdk-core>=2.14.0,<=2.15.2
68+
# 注意: 镜像源中没有 aliyun-python-sdk-nls-cloud-api,需要从其他源安装
69+
# aliyun-python-sdk-nls-cloud-api==1.0.0
70+
# 如果镜像源没有,可以尝试: pip install aliyun-python-sdk-nls-cloud-api --index-url https://pypi.org/simple
71+
aliyun-python-sdk-imageprocess>=1.0.0,<=2.0.7
72+
aliyun-python-sdk-ocr>=1.0.0,<=1.0.25
5373

5474
# 音频处理
5575
# 注意: wave 和 audioop 是Python标准库,无需安装
56-
gTTS>=2.4.0
76+
# 注意: 镜像源中 gTTS 最高版本为 2.2.4
77+
gTTS>=2.0.0,<=2.2.4
5778

5879
# 其他多模态依赖
5980
# 注意: numpy版本需要兼容librosa、opencv-python、deepface等

0 commit comments

Comments
 (0)