uwsgi 模块安装

安装

  1. 安装
    pip3 install uwsgi
  1. 测试:新建test.py 输入以下内容
    def application(env, start_response):
        start_response('200 OK', [('Content-Type','text/html')])
        return [b"Hello World"]
  1. uwsgi启动8000端口,浏览器访问你的ip:8000
    root@VM-0-9-ubuntu:~# uwsgi --http :8000 --wsgi-file test.py

使用宝塔安装uwsgi后,提示“uwsgi: command not found”

1. 首先查找`find / -name uwsgi`
2. 建立软链`ln -s /xxx /usr/bin/uwsgi`
原文地址:https://www.cnblogs.com/JeromeLong/p/15757292.html