Error Installing Uwsgi in Virtualenv

How to install uwsgi on windows?

Step 1: Download this stable release of uWSGI

Step 2: Extract the tar file inside the site-packages folder of the virtual environment.

For example the extracted path to uwsgi should be:

\my_env\lib\site-packages\uwsgi-2.0.19.1

Step 3: Open uwsgi-2.0.19.1\uwsgiconfig.py And do the following edits:

import platform
...

Then wherever you encounter

...
os.uname()[x-index]
...

modify it with

...
platform.uname()[x-index]
...

Step 4: Finally, Open powershell and cd into \my_env\lib\site-packages\uwsgi-2.0.19.1 and run:

python setup.py install

Got an error? Check out this

Step 5: Run pip install uwsgi you'll get Requirement already satisfied:. Try pip freeze you'll see uwsgi is listed. Which means you have now successfully installed uwsgi. Congrats!


Reference

pip install uwsgi gives Error : AttributeError: module 'os' has no attribute 'uname'

Installing UWSGI wasn't an easy task. @Seraph answer did helped but he missed some points, that i did to finally install UWSGI.

So here is Complete Steps so that you won't have to waste a day on this like me:

  1. Install Cygwin download

    (Cygwin is an open source collection of tools that allows Unix or Linux applications to be compiled and run on a Windows operating system from within a Linux-like interface).

    This youtube link will help you in the process of downloading Cygwin.

  2. Packages u require in cygwin :

    gcc-core

    gcc-g++

    libintl-devel

    python3-devel

    python38-devel

    gettext-devel

(if it gives error that it require c compiler, then gcc-core will help, if it errors: -lintl missing, then libintl-devel helps)

3.After you open the Cygwin app, you can follow the above youtube link, to successfully run uwsgi on your Windows System.



Related Topics



Leave a reply



Submit