问题简介:成功安装vnpy2.0版本后,尝试运行一下tests/trader/下的run.py,提示缺少ibapi,但安装其实没发现问题.
系统环境:ubuntu18,基于最新版anaconda安装的整个环境
cd vnpy/tests/trader/
执行:python run.py
报错:
File "/home/john/anaconda3/envs/vnpy/lib/python3.7/site-packages/vnpy-2.0-py3.7.egg/vnpy/gateway/ib/ib_gateway.py", line 9, in <module>
from ibapi import comm
ModuleNotFoundError: No module named 'ibapi'
明显是ibapi没安装,
但执行
pip install ib-api
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: ib-api in /home/john/anaconda3/envs/vnpy/lib/python3.7/site-packages (0.9.70)
看起来是没问题的
后来又改用source方式安装
git clone https://github.com/blampe/IbPy
cd IbPy
python setup.py install
也是成功的,那么哪里出的问题导致无法import呢?