必须要指定安装版本,保持版本号的兼容性,不然会报错
pip install pyqt5==5.12.0
pip install pyqt5==5.15.2
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5.QtCore import QUrl
import sys
print("err param, please check it")
if len(sys.argv) < 2:
print("err param, please check it")
exit(0)
print("file = {}".format(sys.argv[1]))
app = QApplication([])
view = QWebEngineView()
view.load(QUrl("file:///C:/Users/Maohan/Desktop/roadcrusling/user001_map.html"))
view.show()
app.exec_()