pythonweb(1)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010082526/article/details/86506008

from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler  #导入HTTP处理相关的模块

ModuleNotFoundError: No module named 'BaseHTTPServer'

这里是涉及到python3和python2的语法区别,我的pywebsocket是python2版本的,但是Python却是python3.0的版本。basehttpserver在python3中已经替换为http.server了,查看更多详细情况可以打开链接:

改成

from http.server import HTTPServer, BaseHTTPRequestHandler

https://blog.csdn.net/testcs_dn/article/details/50449048

猜你喜欢

转载自blog.csdn.net/u010082526/article/details/86506008