vnpy 4.0 Docker镜像制作过程中,从continuumio/anaconda3:latest 作为基础镜像,vnpy 4.0主程序安装成功,ta-lib和pyside6等都安装成功。
容器内已经安装的apt模块:net-tools gcc libxcb1 libxcb1-dev libgl1-mesa-dev libxcb-cursor0 build-essential python3-dev ninja-build ,已经pip 安装的模块:meson meson-python。
按照pip install vnpy_ctp ,或者本地安装(gitclone 代码本地后 pip install)均报错如下:
Obtaining file:///vnpy/vnpy_ctp
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing editable metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [55 lines of output]
+ meson setup --reconfigure /vnpy/vnpy_ctp /vnpy/vnpy_ctp/.vnpy_ctpapi -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/vnpy/vnpy_ctp/.vnpy_ctpapi/meson-python-native-file.ini
The Meson build system
Version: 1.8.1
Source dir: /vnpy/vnpy_ctp
Build dir: /vnpy/vnpy_ctp/.vnpy_ctpapi
Build type: native build
Project name: vnpy_ctp
Project version: 6.7.7.1
C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (Debian 12.2.0-14+deb12u1) 12.2.0")
C++ linker for the host machine: c++ ld.bfd 2.40
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python found: YES (/opt/conda/bin/python3.13)
Message: 使用pybind11路径: /opt/conda/lib/python3.13/site-packages/pybind11/include
Message: 构建目标系统: linux
Library thostmduserapi_se found: YES
Library thosttraderapi_se found: YES
WARNING: Please do not define rpath with a linker argument, use install_rpath
or build_rpath properties instead.
This will become a hard error in a future Meson release.
WARNING: Please do not define rpath with a linker argument, use install_rpath
or build_rpath properties instead.
This will become a hard error in a future Meson release.
Build targets in project: 2
vnpy_ctp 6.7.7.1
User defined options
Native files: /vnpy/vnpy_ctp/.vnpy_ctpapi/meson-python-native-file.ini
b_ndebug : if-release
b_vscrt : md
buildtype : release
Found ninja-1.11.1 at /usr/bin/ninja
Generating targets: 0%| | 0/2 eta ?
Writing build.ninja: 0%| | 0/32 eta ?
Cleaning... 0 files.
+ /usr/bin/ninja
[1/2] Linking target vnctpmd.cpython-313-aarch64-linux-gnu.so
FAILED: vnctpmd.cpython-313-aarch64-linux-gnu.so
c++ -o vnctpmd.cpython-313-aarch64-linux-gnu.so vnctpmd.cpython-313-aarch64-linux-gnu.so.p/vnpy_ctp_api_vnctp_vnctpmd_vnctpmd.cpp.o -Wl,--as-needed -Wl,--allow-shlib-undefined -Wl,-O1 -shared -fPIC '-Wl,-rpath,$ORIGIN/../vnpy_ctp/api' -Wl,--start-group -lstdc++ '-Wl,-rpath,$ORIGIN' /vnpy/vnpy_ctp/vnpy_ctp/api/libthostmduserapi_se.so -Wl,--end-group
/usr/bin/ld: /vnpy/vnpy_ctp/vnpy_ctp/api/libthostmduserapi_se.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[2/2] Linking target vnctptd.cpython-313-aarch64-linux-gnu.so
FAILED: vnctptd.cpython-313-aarch64-linux-gnu.so
c++ -o vnctptd.cpython-313-aarch64-linux-gnu.so vnctptd.cpython-313-aarch64-linux-gnu.so.p/vnpy_ctp_api_vnctp_vnctptd_vnctptd.cpp.o -Wl,--as-needed -Wl,--allow-shlib-undefined -Wl,-O1 -shared -fPIC '-Wl,-rpath,$ORIGIN/../vnpy_ctp/api' -Wl,--start-group -lstdc++ '-Wl,-rpath,$ORIGIN' /vnpy/vnpy_ctp/vnpy_ctp/api/libthosttraderapi_se.so -Wl,--end-group
/usr/bin/ld: /vnpy/vnpy_ctp/vnpy_ctp/api/libthosttraderapi_se.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
不知哪里出了问题?是否有解法?在此拜谢。