First Use Uwsgi:no python application found, check your startup logs for errors

Source: Internet
Author: User

Follow the documentation to first write a test.py file to test whether the installation was successful

1 def application (env, start_response): 2     Start_response ('kOK', [('content-type',' text/html ' )])3     return ["HelloWorld"]

As a result, neither the content nor the actual error has been displayed.

Look closely at the run Echo: there was a paragraph without using PCRE, so reinstall UWSGI

First Execute

sudo pip uninstall Uwsgi

A prompt with no directory permissions appears

Execute, sudo chown-r $ (whoami)/***/http

Then re-execute, sudo pip uninstall Uwsgi

Uninstall complete

Reinstall, this time did not use PIP install Uwsgi

Instead, download the tar package directly in the https://pypi.python.org/pypi/uWSGI/

Perform

TAR-XVF uwsgi-2.0.15.tar.gz

CD uwsgi-2.0.15

Make

Re-execute, the results always show no Python application found, check your startup logs for errors

To view the manual and discover Python3, you need to use the following code

1 def application (env, start_response): 2     Start_response ('kOK', [('content-type',' text/html ' )])3     return [b"HelloWorld"]

But still not.

Re-view the manual and find that you need to add parameters to the command line--plugin python

Execute the following command line:

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

Re-access localhost:8001

You can see the successful display of ' Hello world '

PS: Manual for Accessories UWSGI

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

First Use Uwsgi:no python application found, check your startup logs for errors

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.