class index:
def GET(self):
return "Hello, world!"
if __name__ == "__main__":
app = web.application(urls, globals())
app.run()
——————————————————————————————————(分割线)
C:\Python3\python.exe D:/python/web1.py
Traceback (most recent call last):
File "D:/python/web1.py", line 13, in <module>
app.run()
File "C:\Python3\lib\site-packages\web\application.py", line 312, in run
return wsgi.runwsgi(self.wsgifunc(*middleware))
File "C:\Python3\lib\site-packages\web\wsgi.py", line 59, in runwsgi
return httpserver.runsimple(func, server_addr)
File "C:\Python3\lib\site-packages\web\httpserver.py", line 154, in runsimple
func = LogMiddleware(func)
File "C:\Python3\lib\site-packages\web\httpserver.py", line 296, in __init__
from BaseHTTPServer import BaseHTTPRequestHandler
ModuleNotFoundError: No module named 'BaseHTTPServer'
我觉得老师的办法应该是可行的。但是我去那个web3的网站上看最新的包只支持python3.5,我的是3.6
其实我本来抱着试一试万一3.6也可以用的想法就安装了,结果还是不行。
Traceback (most recent call last):
File "D:/python/web1.py", line 1, in <module>
import web3
File "C:\Python3\lib\site-packages\web3\__init__.py", line 5, in <module>
from .utils.crypto import (
File "C:\Python3\lib\site-packages\web3\utils\crypto.py", line 5, in <module>
import six
ModuleNotFoundError: No module named 'six'