vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 4
声望: 0

主机环境: windows 10 64 bit
虚拟机: ubuntu 18.04 64 bit
源码 : vnpy 1.9.2-LTS

在源码目录跑了 bash install.sh 之后
(base) vnpy@ubuntu:/mnt/hgfs/0-Projects/github/vnpy_1.9.2-LTS$ /home/vnpy/miniconda3/bin/python /mnt/hgfs/0-Projects/github/vnpy_1.9.2-LTS/examples/VnTrader/run.py
Traceback (most recent call last):
File "/mnt/hgfs/0-Projects/github/vnpy_1.9.2-LTS/examples/VnTrader/run.py", line 28, in <module>
from vnpy.trader.gateway import (ctpGateway, ibGateway, huobiGateway)
File "/home/vnpy/miniconda3/lib/python3.7/site-packages/vnpy-1.9.2-py3.7.egg/vnpy/trader/gateway/ctpGateway/init.py", line 5, in <module>
from .ctpGateway import CtpGateway
File "/home/vnpy/miniconda3/lib/python3.7/site-packages/vnpy-1.9.2-py3.7.egg/vnpy/trader/gateway/ctpGateway/ctpGateway.py", line 16, in <module>
from vnpy.api.ctp import MdApi, TdApi, defineDict
File "/home/vnpy/miniconda3/lib/python3.7/site-packages/vnpy-1.9.2-py3.7.egg/vnpy/api/ctp/init.py", line 4, in <module>
from .vnctpmd import MdApi
ModuleNotFoundError: No module named 'vnpy.api.ctp.vnctpmd'

Administrator
avatar
加入于:
帖子: 3809
声望: 197

编译失败,请检查编译过程中的输出,估计是某个工具没能自动安装

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

因为是在vmware 虚拟机全新安装的ubuntu系统,很多package没有安装。
现按照以下命令准备好编译环境后,可以了。

sudo apt install cmake
sudo apt-get install libboost-dev
sudo apt-get install build-essential
sudo apt-get install python-dev
sudo apt install libboost-python-dev
sudo apt-get install libboost-all-dev
sudo apt-get update
sudo apt-get install libboost-all-dev

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

不过,出现了 ImportError: dynamic module does not define module export function 这个错误。
我看到编译选项是 lpython2.7的,而我的python是 miniconda3 python 3.7

Administrator
avatar
加入于:
帖子: 3809
声望: 197

1.9.2只支持2.7的Python

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