1. pip install uwsgi reports an error AttributeError: module 'os' has no attribute 'uname'
error description:
It is because in the uwsgiconfig.py file, os.uname() does not support the windows system, and the platform module supports any system.
Solution:
Download uwsgi offline installation
https://pypi.python.org/pypi/uWSGI/
After decompressing, enter the directory, modify the uwsgiconfig.py file, import platform, set os.uname() to platform.uname()
and then Then cd into the directory and execute: python setup.py install
2. Error report: Exception: you need a C compiler to builduWSGI
Error message: C language compilation environment needs to be installed
Solution:
If there is no C compilation environment on the machine, you need to download a compiler
Recommended download: MinGW
3. Error when installing mingw: There is no file extension js script engine
Solution:
(1) Enter "regedit" in the Start menu -> Search
(2) Select the "HKEY_CLASSES_ROOT" item
(3) Find the ".js" item
(4) At this time, we found that its data has been modified
(5) Double-click to modify the data of the item to "JSFile" to solve the problem
4. After installing mingw, right-click the third start under Package on the right side of the interface, then select "Mark for installation", and execute repeatedly until mingw32-gcc-ada-bin, mingw32-gcc-fortran-bin, mingw32 -gcc-g+±bin, mingw32-gcc-objc-bin are selected, then select Apply Changes in the installation column, then a dialog box will pop up, click Apply, wait 30 minutes or more, wait for the download and installation Done, if the last picture appears during the process, click OK;
when the download is complete, the next thing we need to do is configure the environment variables, enter the root directory of the c drive, find the MinGW folder, and find the bin file folder and open it, as shown in the figure below, and then copy the path: C:\MinGW\bin;
Then right-click on the desktop "Computer", select "Properties", then click "Advanced System Settings", then click "Environment Variables", append the semicolon ";" in the English state of the input method at the end of the variable value, and add the semicolon after the semicolon. "C:\MinGW\bin" is enough, such as ";C:\MinGW\bin", the final confirmation is OK;
Then test whether the installation and configuration are successful. Press the windows + r key combination to call up the command prompt, then enter cmd, then enter gcc -v. If no error is reported, the installation and configuration are successful, as shown in the following figure.
5. Enter the uwsgi directory again and run:
python setup.py install