vnpy 依赖的环境搭建完毕,但在 powershell 中运行 “python run.py” 时出现如下异常报错:
PS D:\vnpy-3.9.1\examples\veighna_trader> python run.py
Traceback (most recent call last):
File "D:\vnpy-3.9.1\examples\veighna_trader\run.py", line 7, in <module>
from vnpy_ctp import CtpGateway
File "D:\python\lib\site-packages\vnpy_ctp__init.py", line 26, in <module>
from .gateway import CtpGateway
File "D:\python\lib\site-packages\vnpy_ctp\gateway\init.py", line 1, in <module>
from .ctp_gateway import CtpGateway
File "D:\python\lib\site-packages\vnpy_ctp\gateway\ctp_gateway.py", line 31, in <module>
from ..api import (
File "D:\python\lib\site-packages\vnpy_ctp\api\init.py", line 1, in <module>
from .vnctpmd import MdApi
ModuleNotFoundError: No module named 'vnpy_ctp.api.vnctpmd'
PS D:\vnpy-3.9.1\examples\veighna_trader> pip install vnpy_ctp
Requirement already satisfied: vnpy_ctp in d:\python\lib\site-packages (6.7.2.0)
Requirement already satisfied: importlib-metadata in d:\python\lib\site-packages (from vnpy_ctp) (7.0.2)
Requirement already satisfied: zipp>=0.5 in d:\python\lib\site-packages (from importlib-metadata->vnpy_ctp) (3.18.1)
PS D:\vnpy-3.9.1\examples\veighna_trader> python run.py
Traceback (most recent call last):
File "D:\vnpy-3.9.1\examples\veighna_trader\run.py", line 7, in <module>
from vnpy_ctp import CtpGateway
File "D:\python\lib\site-packages\vnpy_ctp\init.py", line 26, in <module>
from .gateway import CtpGateway
File "D:\python\lib\site-packages\vnpy_ctp\gateway\init.py", line 1, in <module>
from .ctp_gateway import CtpGateway
File "D:\python\lib\site-packages\vnpy_ctp\gateway\ctp_gateway.py", line 31, in <module>
from ..api import (
File "D:\python\lib\site-packages\vnpy_ctp\api\init__.py", line 1, in <module>
from .vnctpmd import MdApi
ModuleNotFoundError: No module named 'vnpy_ctp.api.vnctpmd'
依赖的库已经校验版本都是满足的,唯有talib=0.4.26(官方要求0.4.24但此处并无报错),目前的python==3.10.14, vnpy ==3.9.1,求助应该如何处理?谢谢