uwsgi 模块安装

安装

  1. 安装
    pip3 install uwsgi
    ln -s /usr/local/python3/bin/uwsgi /usr/bin/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`
posted @ 2022-01-02 12:35  Jerome12138  阅读(88)  评论(0编辑  收藏  举报