BUG之路2--ubuntu安装uwsgi测试报错:failed to open python file test.py

在Ubuntu上安装uwsgi并进行测试时遇到'failed to open python file test.py'的错误。原因是运行uwsgi命令的终端位置与test.py文件位置不同。解决方法是确保两者在同一目录下,正确安装uwsgi的步骤包括安装libpcre3相关库,使用pip3安装uwsgi,编写并放置test.py文件,然后在相同目录下运行uwsgi命令。
摘要由CSDN通过智能技术生成

心路历程

毫无疑问,又是能让我跳楼的BUG,但是结果都一样,很小的细节,卡我两天时间。

BUG过程:

在ubuntu上部署django项目时,需要安装uwsgi服务器。根据教程安装完之后,然后会有一个小测试,就是写一个test.py文件运行一下看uwsgi是否安装成功。具体的test.py文件我就不贴了,网上一堆。
然后重要的是在运行命令:uwsgi –http :8001 –wsgi-file test.py时,报错了。详细错误信息如下:

dh@ubuntu:~$ uwsgi –http :8001 –wsgi-file test.py
Starting uWSGI 2.0.17 (64bit) on [Mon Jun 11 12:37:29 2018]
compiled with version: 7.3.0 on 07 June 2018 06:45:48
os: Linux-4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018
nodename: ubuntu
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /home/dh
detected binary path: /home/dh/.local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
WARNING: you are running uWSGI without its master process manager
your

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值