windows7-32位系统下部署flask程序(wsgi简单快速配置)---编辑中

安装pytyon3.7

C:\Users\Zfm>cd C:\Users\Zfm\AppData\Local\Programs\Python\Python37-32\Scripts

cmd切换到该目录下,使用
C:\Users\Zfm\AppData\Local\Programs\Python\Python37-32\Scripts>pip install mod_wsgi-4.7.1-cp37-cp37m-win32.whl

提示mod_wsgi-4.7.1安装成功

mod_wsgi-express module-config
生成以下三行
LoadFile "c:/users/zfm/appdata/local/programs/python/python37-32/python37.dll"
LoadModule wsgi_module "c:/users/zfm/appdata/local/programs/python/python37-32/lib/site-packages/mod_wsgi/server/mod_wsgi.cp37-win32.pyd"
WSGIPythonHome "c:/users/zfm/appdata/local/programs/python/python37-32"

把这三行内容复制到httpd.conf文件下进行配置,如图:

SyntaxError: Non-UTF-8 code starting with '\\xcf' in file D:/zz/web/wsgi.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details\r, referer: http://localhost:5000/.
代码第一行加上
# -*-coding:utf-8-*-

替换更目录

D:\zz\Apache24\conf>pip install flask -i https://pypi.tuna.tsinghua.edu.cn/simple

上一篇:在delphi 获取特殊目录 SHGetSpecialFolderLocation SHGetPathFromIDList


下一篇:多线程