vn.py官网
开源量化社区
Member
avatar
加入于:
帖子: 3
声望: 0

使用 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)

Member
avatar
加入于:
帖子: 3
声望: 0

我看有人在ubuntu上也遇到了这个问题。

Administrator
avatar
加入于:
帖子: 5108
声望: 296

我们安排同事来测试下

Member
avatar
加入于:
帖子: 1
声望: 0

我在 windows 下编译也遇到这问题了
Traceback (most recent call last):
File "E:/Python/vnstudio/run.py", line 3, in <module>
from vnpy.trader.ui import MainWindow, create_qapp
File "E:\Python\vnstudio\vnpy\trader\ui__init.py", line 10, in <module>
from .mainwindow import MainWindow
File "E:\Python\vnstudio\vnpy\trader\ui\mainwindow.py", line 27, in <module>
from .editor import CodeEditor
File "E:\Python\vnstudio\vnpy\trader\ui\editor.py", line 4, in <module>
from PyQt5 import QtWidgets, Qsci, QtGui
ImportError: cannot import name 'Qsci' from 'PyQt5' (C:\ProgramData\Anaconda3\lib\site-packages\PyQt5\
init__.py)

Administrator
avatar
加入于:
帖子: 5108
声望: 296

请试试社区用户发现的解决方案,pip uninstall PyQt5,然后再重装PyQt5 QSintilla

Member
avatar
加入于:
帖子: 2
声望: 0
  1. 卸载 pyqt5, pip uninstall pyqt5
  2. 重新安装 pyqt5, pip install pyqt5

重新启动vnstation,成功!

Member
avatar
加入于:
帖子: 22
声望: 2

我安装的2.14版本也遇到pyqt5的错误,也是找不到指定模块,uninstall pyqt5后,安装原来的模块还是报同样的错误,安装5.15版本的pyqt5问题就没有了,原来自带的pyqt5版本是5.14.1的,还是pyqt5 的版本问题

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号