Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run.py 跑不起来,Library not loaded: @rpath/thostmduserapi_se.framework/Versions/A/thostmduserapi_se #3526

Open
candy-Tong opened this issue Apr 6, 2024 · 2 comments

Comments

@candy-Tong
Copy link

环境

  • 操作系统: mac
  • Python版本: 3.10.14
  • VeighNa版本: 3.9.1

Issue类型

Question

预期程序行为

正常运行

实际程序行为

Library not loaded: @rpath/thostmduserapi_se.framework/Versions/A/thostmduserapi_se

重现步骤

  1. bash install_osx.sh
  2. python3 -m pip install vnpy_ctp --index=https://pypi.doubanio.com/simple
  3. 运行 python examples/veighna_trader/run.py 报错
Traceback (most recent call last):
  File "/Users/bytedance/Downloads/vnpy-3.9.0/examples/veighna_trader/run.py", line 7, in <module>
    from vnpy_ctp import CtpGateway
  File "/Users/bytedance/Downloads/vnpy-3.9.0/.venv/lib/python3.10/site-packages/vnpy_ctp/__init__.py", line 26, in <module>
    from .gateway import CtpGateway
  File "/Users/bytedance/Downloads/vnpy-3.9.0/.venv/lib/python3.10/site-packages/vnpy_ctp/gateway/__init__.py", line 1, in <module>
    from .ctp_gateway import CtpGateway
  File "/Users/bytedance/Downloads/vnpy-3.9.0/.venv/lib/python3.10/site-packages/vnpy_ctp/gateway/ctp_gateway.py", line 31, in <module>
    from ..api import (
  File "/Users/bytedance/Downloads/vnpy-3.9.0/.venv/lib/python3.10/site-packages/vnpy_ctp/api/__init__.py", line 1, in <module>
    from .vnctpmd import MdApi
ImportError: dlopen(/Users/bytedance/Downloads/vnpy-3.9.0/.venv/lib/python3.10/site-packages/vnpy_ctp/api/vnctpmd.cpython-310-darwin.so, 0x0002): Library not loaded: @rpath/thostmduserapi_se.framework/Versions/A/thostmduserapi_se
  Referenced from: <BED264D0-13AA-3CBC-8FA3-A023EB75E154> /Users/bytedance/Downloads/vnpy-3.9.0/.venv/lib/python3.10/site-packages/vnpy_ctp/api/vnctpmd.cpython-310-darwin.so
  Reason: tried: '/Users/cxy/GitHub/vnpy_ctp/vnpy_ctp/api/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/cxy/GitHub/vnpy_ctp/vnpy_ctp/api/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file), '/Users/cxy/GitHub/vnpy_ctp/vnpy_ctp/api/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/cxy/GitHub/vnpy_ctp/vnpy_ctp/api/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file), '/opt/homebrew/lib/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file), '/opt/homebrew/lib/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file), '/Library/Frameworks/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file), '/System/Library/Frameworks/thostmduserapi_se.framework/Versions/A/thostmduserapi_se' (no such file, not in dyld cache)

Process finished with exit code 1
image
@vnpy
Copy link
Owner

vnpy commented Apr 7, 2024

目前pypi上的二进制包无法直接安装,请按照下述步骤以源码安装试下:

pip3 uninstall vnpy_ctp

git clone https://github.com/vnpy/vnpy_ctp
cd vnpy_ctp

pip3 install  .

@candy-Tong
Copy link
Author

目前pypi上的二进制包无法直接安装,请按照下述步骤以源码安装试下:

pip3 uninstall vnpy_ctp

git clone https://github.com/vnpy/vnpy_ctp
cd vnpy_ctp

pip3 install  .

仍然不行,看到这个 issue,vnpy/vnpy_ctp#53 看来大家都有这种情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants