0%

解决cannot import name 'Qsci' from 'PyQt5'

Windows 10 安装 vnpy 2.7.0,报错:

1
2
3
4
5
6
7
8
9
10
Traceback (most recent call last):
File "run.py", line 5, in <module>
from vnpy.trader.ui import MainWindow, create_qapp
File "C:\ProgramData\Miniconda3\lib\site-packages\vnpy\trader\ui\__init__.py", line 11, in <module>
from .mainwindow import MainWindow
File "C:\ProgramData\Miniconda3\lib\site-packages\vnpy\trader\ui\mainwindow.py", line 28, in <module>
from .editor import CodeEditor
File "C:\ProgramData\Miniconda3\lib\site-packages\vnpy\trader\ui\editor.py", line 4, in <module>
from PyQt5 import QtWidgets, Qsci, QtGui
ImportError: cannot import name 'Qsci' from 'PyQt5' (C:\ProgramData\Miniconda3\lib\site-packages\PyQt5\__init__.py)

解决方案:

1
pip install QScintilla