Windows 11 安装 Dify 完整指南
前置要求
- Python 3.11
- Node.js 18+
- PostgreSQL 14+
- Redis for Windows
- Git
- Ollama (可选,用于本地模型)
详细安装步骤
1. 安装必要软件
-
Python 3.11
- 从 https://www.python.org/downloads/release/python-3110/ 下载安装
- 安装时勾选 “Add Python to PATH”
-
Node.js 18
- 从 https://nodejs.org/ 下载 18.x LTS 版本
- 设置 npm 镜像:
npm config set registry https://registry.npmmirror.com
-
PostgreSQL 14
- 从 https://www.postgresql.org/download/windows/ 下载
- 记住设置的超级用户密码
- 默认端口 5432
-
Redis
- 从 https://github.com/microsoftarchive/redis/releases 下载
- 安装 Redis-x64-3.0.504.msi
requirements.txt
# requirements.txt
anthropic==0.23.1
authlib==1.3.1
azure-ai-inference==1.0.0b8
azure-ai-ml==1.20.0
azure-identity==1.16.1
beautifulsoup4==4.12.2
boto3==1.36.12
bs4==0.0.1
cachetools==5.3.0
celery==5.4.0
chardet==5.1.0
cohere==5.2.4
dashscope[tokenizer]==1.17.0
fal-client==0.5.6
flask==3.1.0
flask-compress==1.17
flask-cors==4.0.0
flask-login==0.6.3
flask-migrate==4.0.7
flask-restful==0.3.10
flask-sqlalchemy==3.1.1
gevent==24.11.1
gmpy2==2.2.1
google-ai-generativelanguage==0.6.9
google-api-core==2.18.0
google-api-python-client==2.90.0
google-auth==2.29.0
google-auth-httplib2==0.2.0
google-cloud-aiplatform==1.49.0
google-generativeai==0.8.1
googleapis-common-protos==1.63.0
gunicorn==23.0.0
httpx[socks]==0.27.0
huggingface-hub==0.16.4
jieba==0.42.1