vnpy / vnpy

基于Python的开源量化交易平台开发框架
http://www.vnpy.com
MIT License
24.41k stars 8.58k forks source link

mac无法使用vpny_ctp/vnpy_ctptest #3529

Closed zhtangsh closed 5 months ago

zhtangsh commented 5 months ago

环境

Issue类型

Question

预期程序行为

预期可以使用vnpy_ctp/vnpy_ctptest

实际程序行为

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/zhtangsh/dev/vnpy/vnpy_ctp/vnpy_ctp/__init__.py", line 26, in <module>
    from .gateway import CtpGateway
  File "/Users/zhtangsh/dev/vnpy/vnpy_ctp/vnpy_ctp/gateway/__init__.py", line 1, in <module>
    from .ctp_gateway import CtpGateway
  File "/Users/zhtangsh/dev/vnpy/vnpy_ctp/vnpy_ctp/gateway/ctp_gateway.py", line 31, in <module>
    from ..api import (
  File "/Users/zhtangsh/dev/vnpy/vnpy_ctp/vnpy_ctp/api/__init__.py", line 1, in <module>
    from .vnctpmd import MdApi
ImportError: dlopen(/Users/zhtangsh/dev/vnpy/vnpy_ctp/vnpy_ctp/api/vnctpmd.cpython-310-darwin.so, 2): Library not loaded: @rpath/thostmduserapi_se.framework/Versions/A/thostmduserapi_se
  Referenced from: /Users/zhtangsh/dev/vnpy/vnpy_ctp/vnpy_ctp/api/vnctpmd.cpython-310-darwin.so
  Reason: no suitable image found.  Did find:
    /Users/zhtangsh/dev/vnpy/vnpy_ctp/vnpy_ctp/api/thostmduserapi_se.framework/Versions/A/thostmduserapi_se: code signature invalid for '/Users/zhtangsh/dev/vnpy/vnpy_ctp/vnpy_ctp/api/thostmduserapi_se.framework/Versions/A/thostmduserapi_se'

复现步骤

git clone git@github.com:vnpy/vnpy.git
cd vnpy
bash install_osx.sh
cd ..
git clone git@github.com:vnpy/vnpy_ctp.git
cd vnpy_ctp
pip install -e .

具体问题

想询问一下vnpy_ctp和vnpy_ctptest的状态,想问一下

  1. 目前是否支持mac?我看vnpy_ctp里有mac的build选项
zhtangsh commented 5 months ago

duplicated with https://github.com/vnpy/vnpy_ctp/issues/53 close