VeighNa量化社区
你的开源社区量化交易平台
bnose's Avatar
Member
离线
7 帖子
声望: 0

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

用Python的交易员 wrote:

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

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

横权霸 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的报错解决补不了。

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

编译顺利通过,但运行时出错。
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的交易员

好的,谢谢!

尝试在树莓派上安装vnpy2.0.7,踩过了N多坑之后,最后卡在了vnpy的编译上,报错信息如下:
running build_ext
building 'vnpy.api.ctp.vnctptd' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ivnpy/api/ctp/include -Ivnpy/api/ctp/vnctp -I/usr/include/python3.7m -c vnpy/api/ctp/vnctp/vnctptd/vnctptd.cpp -o build/temp.linux-armv7l-3.7/vnpy/api/ctp/vnctp/vnctptd/vnctptd.o -std=c++17 -O3 -Wno-delete-incomplete -Wno-sign-compare
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.7/vnpy/api/ctp/vnctp/vnctptd/vnctptd.o -Lvnpy/api/ctp/libs -Lvnpy/api/ctp -Wl,--enable-new-dtags,-R$ORIGIN -lthostmduserapi_se -lthosttraderapi_se -o build/lib.linux-armv7l-3.7/vnpy/api/ctp/vnctptd.cpython-37m-arm-linux-gnueabihf.so -lstdc++
vnpy/api/ctp/libthostmduserapi_se.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

我理解这个libthostmduserapi_se.so,是在不同的平台上用不同的gcc版本编译的,在树莓派上无法识别?
请教下@用Python的交易员,vnpy是否可以在arm平台上安装成功运行?
盼复,多谢!

© 2015-2022 微信 18391752892
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

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