环境:ubuntu18.04 LTS
安装方法:bash install.sh
可以加载ctp连接simnow,但是我准备实盘,所以需要在期货公司那里进行穿透测试,所以这里加载ctptest
代码
#!/usr/bin/env python
from vnpy.gateway.ctptest import CtptestGateway
报错
Traceback (most recent call last):
File "./test_run.py", line 4, in <module>
from vnpy.gateway.ctptest import CtptestGateway
File "/home/jlz/.pyenv/versions/vnpy3.7.6/lib/python3.7/site-packages/vnpy/gateway/ctptest/__init__.py", line 1, in <module>
from .ctptest_gateway import CtptestGateway
File "/home/jlz/.pyenv/versions/vnpy3.7.6/lib/python3.7/site-packages/vnpy/gateway/ctptest/ctptest_gateway.py", line 6, in <module>
from .vnctpmd import MdApi
ModuleNotFoundError: No module named 'vnpy.gateway.ctptest.vnctpmd'
但是这个文件夹下面确实有这个文件
(vnpy3.7.6) jlz@jlz-GE62-2QD:~/.pyenv/versions/vnpy3.7.6/lib/python3.7/site-packages/vnpy/gateway/ctptest$ pwd
/home/jlz/.pyenv/versions/vnpy3.7.6/lib/python3.7/site-packages/vnpy/gateway/ctptest
(vnpy3.7.6) jlz@jlz-GE62-2QD:~/.pyenv/versions/vnpy3.7.6/lib/python3.7/site-packages/vnpy/gateway/ctptest$ ls
ctp_constant.py ctptest_gateway.py __init__.py __pycache__ thostmduserapi_se.dll thosttraderapi_se.dll vnctpmd.pyd vnctptd.pyd
(vnpy3.7.6) jlz@jlz-GE62-2QD:~/.pyenv/versions/vnpy3.7.6/lib/python3.7/site-packages/vnpy/gateway/ctptest$
请问是什么原因呢?