无法在IIS中安装wfastcgi 2.1,求安装包用于Win10部署Django
Hey there! I dealt with a similar headache when maintaining Python 2.7 Django apps on IIS a while back, so let’s get you sorted out with that wfastcgi 2.1 install.
First off, the official download links for wfastcgi 2.1 (targeting Python 2.7.9) are probably broken because Python 2.7 has reached end-of-life. But you’ve still got a few solid options:
Install via pip with specific version
Fire up Command Prompt as an admin and try this first. If your pip is outdated (super common with Python 2.7), update it to the last version that supports Python 2.7 first:python -m pip install --upgrade pip==20.3.4Then install the exact 2.1 version:
pip install wfastcgi==2.1Grab the package from PyPI archives
You can download the wfastcgi 2.1 wheel or source package directly. Once you have it saved locally:- For the wheel file (like
wfastcgi-2.1-py2-none-any.whl), run:pip install path/to/wfastcgi-2.1-py2-none-any.whl - If you downloaded the source zip, unzip it, navigate to the folder in Command Prompt, and run:
python setup.py install
- For the wheel file (like
Fallback: Use a compatible newer version
If you can’t track down the 2.1 package for some reason, try installing the latest wfastcgi version that works with Python 2.7. Just run:pip install wfastcgiI’ve used this successfully with Python 2.7.9 and IIS before, so it should do the trick.
Once you’ve got wfastcgi installed, don’t forget to set up the handler mapping in IIS to point *.py requests to the wfastcgi script, and configure your web.config with the correct Django settings path and WSGI handler.
内容的提问来源于stack exchange,提问作者MAXI1693

