VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 7
声望: 0

编译顺利通过,但运行时出错。
1、先是import DaGateway出错,pip install WMI 之后,报错找不到win32com包。此处无解,遂屏蔽run.py中的“from vnpy.gateway.da import DaGateway”
2、再次运行,QT又报错,如下:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
已放弃 (核心已转储)

卡在这个问题上了,求助!@用Python的交易员

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

补充下,用的桌面是XFCE。
网上搜了多种解决方案,没一个有用,郁闷。

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

1 可以python -m pip install pywin32 来解决昨天安装的时候刚解决 试一下 import wmi看看会不会报错,如果不会报错,重新执行 python -m pip install .
下面的报错也可以解决

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

横权霸 wrote:

1 可以python -m pip install pywin32 来解决昨天安装的时候刚解决 试一下 import wmi看看会不会报错,如果不会报错,重新执行 python -m pip install .
下面的报错也可以解决

谢谢!pip install WMI是可以的,import wmi也正常。但是安装pywin32也是报错的:

ERROR: Could not find a version that satisfies the requirement pywin32 (from versions: none)
ERROR: No matching distribution found for pywin32

da屏蔽掉暂时问题不大,关键是第二个xcb的报错解决补不了。

Administrator
avatar
加入于:
帖子: 4500
声望: 320

wmi是Windows系统上独有的系统API调用库,linux用不了的,所以注释掉DaGateway相关的加载就行

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

用Python的交易员 wrote:

wmi是Windows系统上独有的系统API调用库,linux用不了的,所以注释掉DaGateway相关的加载就行

谢谢!第二个问题用笨办法也解决了,就是先安装一个qt5的应用(例如qbittorrent),就可以用了。
另外请教个问题,ubuntu上的vntrader,若想用simnow模拟账号,只能手动在代码里改?

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

bnose wrote:

用Python的交易员 wrote:

wmi是Windows系统上独有的系统API调用库,linux用不了的,所以注释掉DaGateway相关的加载就行

谢谢!第二个问题用笨办法也解决了,就是先安装一个qt5的应用(例如qbittorrent),就可以用了。
另外请教个问题,ubuntu上的vntrader,若想用simnow模拟账号,只能手动在代码里改?

不需要 直接在Ui界面点击ctp连接,输入申请好的帐号密码就好了

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

已经搞定了,在run.py里可以配置。

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

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】