使用 python run.py 后的具体内容是:
$ python run.py
Traceback (most recent call last):
File "run.py", line 5, in <module>
from vnpy.trader.ui import MainWindow, create_qapp
File "/opt/anaconda3/lib/python3.7/site-packages/vnpy/trader/ui/init.py", line 10, in <module>
from .mainwindow import MainWindow
File "/opt/anaconda3/lib/python3.7/site-packages/vnpy/trader/ui/mainwindow.py", line 27, in <module>
from .editor import CodeEditor
File "/opt/anaconda3/lib/python3.7/site-packages/vnpy/trader/ui/editor.py", line 4, in <module>
from PyQt5 import QtWidgets, Qsci, QtGui
ImportError: cannot import name 'Qsci' from 'PyQt5' (/opt/anaconda3/lib/python3.7/site-packages/PyQt5/init.py)
使用pip install QScintilla显示我原本就已经有PyQt5了。(所以可以排除库的问题
$ pip install QScintilla
Requirement already satisfied: QScintilla in /opt/anaconda3/lib/python3.7/site-packages/QScintilla-2.11.3-py3.7-macosx-10.9-x86_64.egg (2.11.3)
Requirement already satisfied: PyQt5>=5.10.1 in /opt/anaconda3/lib/python3.7/site-packages (from QScintilla) (5.13.2)
Requirement already satisfied: PyQt5_sip<13,>=4.19.19 in /opt/anaconda3/lib/python3.7/site-packages (from PyQt5>=5.10.1->QScintilla) (12.7.0)