Windows 10 installation Uwsgi: Not feasible, failed

Source: Internet
Author: User
Tags nginx server

Windows 10 Home Chinese version, Python 3.6.4,uwsgi-2.0.17.tar.gz, compression tool -7-zip

Hint: Please do not like me to try, wasting time, go to play on Linux!

Several hours of installation experience

Yesterday afternoon to learn to deploy "Django Project to Nginx Server", this deployment in addition to the Nginx server, but also need a and Nginx server

The Protocol software for communication--Uwsgi.

However, after trying, eventually failed to install Uwsgi to Windows 10, and a netizen's blog said Uwsgi does not support the Windows

installed, that is, not possible! However, both the official website and the Netizen's blog post indicate that you can install Cygwin on Windows and then install it in the Cygwin environment.

I thought , no need to continue to try to install UWSGI and other software on Cygwin, directly install a Linux operating system (Ubuntu? ), and then try

Test is the best, after all, the final Django project is going to be deployed on Linux or UNIX.

Errors that occur during the installation

1.PIP Installation

Traceback Display in uwsgiconfig.py line 8 call Os.uname () [0] found error:

Attributeerror:module ' OS ' has no attribute ' uname '

Importing the OS module in idle and checking with the dir (OS) command did not find that it had the uname attribute below (the section below):

2.python3 setup.py Install (UWSGI offline package)

After a successful installation using the PIP command, you can attempt to download the module's offline installation package and download it manually.

Comment: Pip can not be installed successfully, except for the reasons not found, download the offline installation package to install successfully? Doubt ~

It can be downloaded from the pypi.org website, Uwsgi's GitHub homepage . is the UWSGI download page for the pypi.org website:

Use 7-zip to extract to the current directory, get a uwsgi-2.0.17.tar, unzip the tar file, get the uwsgi-2.0.17 folder, and then you can base this

The folder is installed Uwsgi.

Then put the Uwsgi folder in the appropriate location (there is a blog post to the Python lib/site-packages, when I think it is not necessary, directly into the C-disk can be).

Next, use the command line to enter the Uwsgi directory--There is a setup.py file to install Uwsgi, execute python3 setup.py install command, knot

Uname, the error still exists.

Do not know what to do, in Baidu entered the error, got the answer--the window installation in the resources Uwsgi encountered uname perfect solution, that is open

uwsgiconfig.py file to modify:

-Import Platform Module

-Replace Os.uname with Platform.uname (total of four)

Execute the python3 setup.py install command again, the result, or error! This tip:

Exception:you need a C compiler to build Uwsgi

A C language compiler is required, but not in the environment at this time!

After a network search, you can install a Cygwin to resolve this issue. All right, install Cygwin.

What is Cygwin? From my experience, it is on the Windows simulation of a Linux operating environment, more see the official website.

Install Cygwin: First selected a Japanese mirror (mirror), the result of installation failed, and later selected the only HK mirror (red box), the installation was successful.

Installation succeeded:

GCC has it too! (is the C compiler we need, in fact, do not explain it?) )

Next, add the compiler command in Cygwin to the Windows environment variable path:

Executing the python3 setup.py Install command again on the Windows command line fails with two error hints:

Uwsgi_event_in, Uwsgi_event_out

So, do the Python3 setup.py install command in Cygwin? The result is still failure!

At this time, almost no recruit!

Network search uwsgi_event_in, uwsgi_event_out related information, and finally found that the two macro definitions appear in the Uwsgi core/event.c source file:

A look, continue web search, Chinese, English-mainly StackOverflow, however, there is no solution , and some blog posts are

Directly say, do not support install UWSGI on Windows!

Maybe it'll be a while, but the big news will never be missed by a Python programmer, right?

Give up the road! Go ahead and install Ubuntu! Go and play Django+nginx+uwsgi on Ubuntu!

P.S.

But why is that so? What is poll (learned many years ago, and later forgotten)?

For information on poll, continue the web search!

Ben.z

Baidu Encyclopedia of Poll ()

You can't publish a Django program on Windows, but you can test and practice the development of your Django program on Windows.

You can also learn the configuration of Nginx+uwsgi by viewing the blog post.

So, can the Django program developed on Windows easily be ported to Linux?

It seems, still have to learn the Linux good!

Resources:

UWSGI official website

Django NGINX+UWSGI Installation Configuration (Novice tutorial)
Uwsgi detailed
Install Uwsgi under Windows Python (2018-02-28)
Windows7 Deploying a Django project using Nginx+apache

Window installation Uwsgi encountered uname perfect solution

Windows 10 installation Uwsgi: Not feasible, failed

Related Article

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.