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

安装完成后执行如下如下程序,错误如下,请问是什么问题,我应该要怎么样解决呢?

(base) AarondeMacBook-Pro:vn_trader aaron$ python run.py
Traceback (most recent call last):
File "run.py", line 11, in <module>
from vnpy.gateway.ctp import CtpGateway
File "/Users/aaron/miniconda3/lib/python3.7/site-packages/vnpy/gateway/ctp/init.py", line 1, in <module>
from .ctp_gateway import CtpGateway
File "/Users/aaron/miniconda3/lib/python3.7/site-packages/vnpy/gateway/ctp/ctp_gateway.py", line 9, in <module>
from vnpy.api.ctp import (
File "/Users/aaron/miniconda3/lib/python3.7/site-packages/vnpy/api/ctp/init.py", line 1, in <module>
from .vnctpmd import MdApi
ModuleNotFoundError: No module named 'vnpy.api.ctp.vnctpmd'

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

加一句,我的vnpy是2.1.4版本

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

践谍 wrote:

加一句,我的vnpy是2.1.4版本
ctp接口不支持mac电脑,因此,跳过,选择其他接口,,你看看课程有说

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

现在Mac上这个问题还是不能解决么?

Member
avatar
加入于:
帖子: 3027
声望: 174

是的,ctp接口不支持mac
可参考https://www.vnpy.com/forum/topic/3120-30duo-tao-apijie-kou-huan-pa-man-zu-bu-liao-ni-de-liang-hua-jiao-yi-xu-qiu

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

run.py里注释掉

from vnpy.gateway.ctp import CtpGateway

main_engine.add_gateway(CtpGateway)

这两行来跳过选择ctp接口,就能看到ui了

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

沪公网安备 31011502017034号