按照文档,首先写一个test.py的文件,进行测试是否安装成功

1 def application(env, start_response):
2     start_response('200 OK', [('Content-Type','text/html')])
3     return ["Hello World"]

结果刚开始既不显示内容,也不现实错误

仔细查看运行回显:出现了一段 没有使用 pcre,于是重新安装 uwsgi

首先执行

sudo pip uninstall uwsgi

出现了 没有目录权限的提示

执行, sudo chown -R $(whoami) /***/http

然后重新执行, sudo pip uninstall uwsgi

卸载完成

重新安装,这次没有采用pip install uwsgi

而是,直接在https://pypi.python.org/pypi/uWSGI/ 进行下载tar包

执行

tar -xvf uwsgi-2.0.15.tar.gz

cd uwsgi-2.0.15

make

重新执行,结果一直显示 no python application found, check your startup logs for errors

查看手册,发现python3,需要使用下面的代码

1 def application(env, start_response):
2     start_response('200 OK', [('Content-Type','text/html')])
3     return [b"Hello World"]

可是仍旧不行

重新查看手册,发现,需要在命令行添加参数 --plugin python

执行下面命令行:

uwsgi --plugin python --http :8001 --wsgi-file test.py

重新访问 localhost:8001

就可以看到 成功的显示了 'Hello world'

PS:附件为uwsgi的手册

https://media.readthedocs.org/pdf/uwsgi-docs-additions/latest/uwsgi-docs-additions.pdf

转载于:https://www.cnblogs.com/loveyangaddddd/p/8119720.html

初次使用uwsgi:no python application found, check your startup logs for errors相关推荐

  1. no python application found_为什么我会得到“uWSGI Error Python application not found”?

    我有nginx配置:server { listen 80; server_name mail.myserver.com; rewrite ^(.*) https://$server_name$requ ...

  2. no python application found_用Nginx部署Django服务no python application found

    报错如下: --- no python application found, check your startup logs for errors --- [pid: 20548|app: -1|re ...

  3. (Python入门)学习笔记一,初次接触尝试使用Python——环境搭建与配置

    (Python入门)学习笔记一,初次接触尝试使用Python 早就耳闻Python大名,搞大数据.做人工智能.整机器学习,就得了解Python.之前一直没有去了解,现在由于之前一个项目涉及到一点Pyt ...

  4. Artifactory——启动错误[Artifactory failed to initialize: check Artifactory logs for errors.]解决方案

    问题描述 浏览器访问http://ip:8081: {"errors" : [ { "status" : 500, "message" : ...

  5. python 连接mysql报错:mysql.connector.errors.NotSupportedError: Authentication plugin ‘caching_sha2_passw

    python 连接mysql报错:mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_passw ...

  6. Redis 错误Please check the Redis logs for details about the RDB error解决

    今天本地给redis定时存数据时出现以下错误:MISCONF Redis is configured to save RDB snapshots, but it is currently not ab ...

  7. python项目部署nginx_详解使用Nginx和uWSGI配置Python的web项目的方法

    基于python的web项目,常见的部署方法有: fcgi:用spawn-fcgi或者框架自带的工具对各个project分别生成监听进程,然后和http服务互动. wsgi:利用http服务的mod_ ...

  8. uwsgi指定python路径_uWsgi服务器(2)--安装配置

    uWsgi做为一款应用服务器,其安装配置是非常简单的. 一.安装 虚拟环境安装 pip install uwsgi 源码安装 wget http://projects.unbit.it/downloa ...

  9. lnmp python _mysql web_Nginx+uWSGI+DJango+Python+ Mysql 搭建可靠的python web服务器

    一.安装所需工具 yum -y install gcc gcc-c++ rpm-build mysql* libtool-ltdl* libtool automake autoconf libtool ...

最新文章

  1. iOS 开发中的MVVM介绍(译)
  2. 实时获取ccd图像_四元数数控:CCD视觉检测定位系统在玻璃瓶缺陷的检测
  3. 停止Java线程,小心interrupt()方法
  4. PIL简单图片处理(上)
  5. 构建实时数据仓库首选,云原生数据仓库AnalyticDB for MySQL技术解密
  6. (79)FPGA如何处理跨时钟域问题-面试必问(三)(第16天)
  7. SpringMVC 框架系列之组件概述与配置详解
  8. jqgrid for asp.net 遍历所有列rowObject时不用输入编号
  9. R语言的cpp扩展支持Rcpp模块介绍
  10. WIN7中文专业版安装英文语言包的方法
  11. 通过路由器设置,不用IPTV盒子,局域网内、局域网外任意设备随时随地观看网络电视直播
  12. 华为模拟器eNSP练习题 - VLAN综合实验
  13. Apache服务器下载
  14. TAP-Win32 Adapter OAS“的网络适配器删除后总是出现(kms激活器及win10激活)
  15. 技术融合:使用区块链的5G——未来无线通信的序章
  16. 很努力了,为什么我还在原地踏步?
  17. 在Mac上使用SSH连接GitHub
  18. 趣拍云:助力APP一周上线人脸识别+动态贴纸
  19. 【C++ 】STL求全排列和组合
  20. 金立E6刷MIUI V5教程

热门文章

  1. gentry同态加密算法_IBM同态加密技术重大突破,加解密速度可提升75倍
  2. 软件工程师的技能知识图谱0.2
  3. 二分查找 递归与非递归实现
  4. 数据库实验6 数据库的分组查询和统计查询
  5. 2017上海ACM ECL-final 总结
  6. 利用k-means算法实现图像自动色彩量化
  7. pytorch 中网络参数 weight bias 初始化方法
  8. java使用UDP数据报通讯方式QQ聊天系统:服务器、客户端
  9. matlab2c使用c++实现matlab函数系列教程-conj函数
  10. 贺利坚老师汇编课程46笔记:操作符offset取得标号的偏移地址