Windows Server 2019 , IIS10 部署 python 環境,該配的都配了,但是運行出錯
test.py
print("<h1>Hello World!</h1>")已經按教配置過 [教程地址:https://www.cnblogs.com/shenh/p/8028081.html]
test.py 也 加過 # coding=gbk 或 utf-8 等編碼都試過,都不行
直接用 python test.py 命令列執行,是可以成功的,就是在iis下運行不了
提示出錯:
HTTP 錯誤 502.2 - Bad Gateway
指定的 CGI 應用程式由于未回傳完整的一組 HTTP 頭而產生錯誤行為。它實際回傳的頭是“ File "C:\Users\flyso\AppData\Local\Programs\Python\Python36\python.exe", line 1 SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Users\flyso\AppData\Local\Programs\Python\Python36\python.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ”。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/225128.html
下一篇:幫忙看看
