安装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