VeighNa量化社区
你的开源社区量化交易平台 | vn.py | vnpy
Member
avatar
加入于:
帖子: 1
声望: 0

错误信息如下:
D:>pip install vnpy_ctp
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting vnpy_ctp
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/3c/c3/03f244037caf9abb5fa7ad01f58415caaa964ff23817be91679f342ab3e3/vnpy_ctp-6.7.11.0.tar.gz (12.6 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [3811 lines of output]

  + meson setup C:\Users\jopil\AppData\Local\Temp\pip-install-5vpyxerw\vnpy-ctp_216482aa813049d38f70489aa4e7c0e4 C:\Users\jopil\AppData\Local\Temp\pip-install-5vpyxerw\vnpy-ctp_216482aa813049d38f70489aa4e7c0e4\.mesonpy-iy3f9iu0 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\jopil\AppData\Local\Temp\pip-install-5vpyxerw\vnpy-ctp_216482aa813049d38f70489aa4e7c0e4\.mesonpy-iy3f9iu0\meson-python-native-file.ini
  The Meson build system
  Version: 1.9.1
  Source dir: C:\Users\jopil\AppData\Local\Temp\pip-install-5vpyxerw\vnpy-ctp_216482aa813049d38f70489aa4e7c0e4
  Build dir: C:\Users\jopil\AppData\Local\Temp\pip-install-5vpyxerw\vnpy-ctp_216482aa813049d38f70489aa4e7c0e4\.mesonpy-iy3f9iu0
  Build type: native build
  Project name: vnpy_ctp
  Project version: 6.7.11.0
  C++ compiler for the host machine: c++ (gcc 15.2.0 "c++ (x86_64-win32-seh-rev0, Built by MinGW-Builds project) 15.2.0")
  C++ linker for the host machine: c++ ld.bfd 2.45
  Host machine cpu family: x86_64
  Host machine cpu: x86_64
  Program python found: YES (D:\Python311\python.exe)
  Run-time dependency python found: YES 3.11
  Message: 使用pybind11路径: C:\Users\jopil\AppData\Local\Temp\pip-build-env-_spqx0j5\overlay\Lib\site-packages\pybind11\include
  Message: 构建目标系统: windows
  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.11.0

    User defined options
      Native files: C:\Users\jopil\AppData\Local\Temp\pip-install-5vpyxerw\vnpy-ctp_216482aa813049d38f70489aa4e7c0e4\.mesonpy-iy3f9iu0\meson-python-native-file.ini
      b_ndebug    : if-release
      b_vscrt     : md
      buildtype   : release

  Found ninja.EXE-1.13.0.git.kitware.jobserver-pipe-1 at C:\Users\jopil\AppData\Local\Temp\pip-build-env-_spqx0j5\normal\Scripts\ninja.EXE
  + meson compile
  [1/4] Compiling C++ object vnctpmd.cp311-win_amd64.pyd.p/vnpy_ctp_api_vnctp_vnctpmd_vnctpmd.cpp.obj
  FAILED: [code=1] vnctpmd.cp311-win_amd64.pyd.p/vnpy_ctp_api_vnctp_vnctpmd_vnctpmd.cpp.obj
  "c++" "-Ivnctpmd.cp311-win_amd64.pyd.p" "-I." "-I.." "-I..\vnpy_ctp\api\include" "-I..\vnpy_ctp\api\vnctp" "-IC:\Users\jopil\AppData\Local\Temp\pip-build-env-_spqx0j5\overlay\Lib\site-packages\pybind11\include" "-ID:\Python311\Include" "-fvisibility=hidden" "-fvisibility-inlines-hidden" "-fdiagnostics-color=always" "-DNDEBUG" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-Wextra" "-std=c++17" "-O3" "/MT" "-DMS_WIN64=" -MD -MQ vnctpmd.cp311-win_amd64.pyd.p/vnpy_ctp_api_vnctp_vnctpmd_vnctpmd.cpp.obj -MF "vnctpmd.cp311-win_amd64.pyd.p\vnpy_ctp_api_vnctp_vnctpmd_vnctpmd.cpp.obj.d" -o vnctpmd.cp311-win_amd64.pyd.p/vnpy_ctp_api_vnctp_vnctpmd_vnctpmd.cpp.obj "-c" ../vnpy_ctp/api/vnctp/vnctpmd/vnctpmd.cpp
  In file included from ../vnpy_ctp/api/vnctp/vnctpmd/vnctpmd.h:6,
                   from ../vnpy_ctp/api/vnctp/vnctpmd/vnctpmd.cpp:4:
  ..\vnpy_ctp\api\vnctp/vnctp.h: In function 'std::string toUtf(const std::string&)':
  ..\vnpy_ctp\api\vnctp/vnctp.h:148:13: warning: 'template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc> class std::__cxx11::wstring_convert' is deprecated [-Wdeprecated-declarations]
    148 |             wstring_convert<codecvt_utf8<wchar_t>> cutf8;
        |             ^~~~~~~~~~~~~~~
  In file included from D:/mingw64/lib/gcc/x86_64-w64-mingw32/15.2.0/include/c++/locale:47,
                   from ..\vnpy_ctp\api\vnctp/vnctp.h:8:
  D:/mingw64/lib/gcc/x86_64-w64-mingw32/15.2.0/include/c++/bits/locale_conv.h:262:33: note: declared here
    262 |     class _GLIBCXX17_DEPRECATED wstring_convert
        |                                 ^~~~~~~~~~~~~~~
  In file included from ../vnpy_ctp/api/vnctp/vnctpmd/vnctpmd.h:8:
  ..\vnpy_ctp\api\include/ctp/ThostFtdcMdApi.h: In member function 'virtual void CThostFtdcMdSpi::OnFrontDisconnected(int)':
  ..\vnpy_ctp\api\include/ctp/ThostFtdcMdApi.h:42:46: warning: unused parameter 'nReason' [-Wunused-parameter]
     42 |         virtual void OnFrontDisconnected(int nReason){};
        |                                          ~~~~^~~~~~~
  ..\vnpy_ctp\api\include/ctp/ThostFtdcMdApi.h: In member function 'virtual void CThostFtdcMdSpi::OnHeartBeatWarning(int)':
  ..\vnpy_ctp\api\include/ctp/ThostFtdcMdApi.h:46:45: warning: unused parameter 'nTimeLapse' [-Wunused-parameter]
     46 |         virtual void OnHeartBeatWarning(int nTimeLapse){};
        |                                         ~~~~^~~~~~~~~~
  ..\vnpy_ctp\api\include/ctp/ThostFtdcMdApi.h: In member function 'virtual void CThostFtdcMdSpi::OnRspUserLogin(CThostFtdcRspUserLoginField*, CThostFtdcRspInfoField*, int, bool)':
  ..\vnpy_ctp\api\include/ctp/ThostFtdcMdApi.h:50:66: warning: unused parameter 'pRspUserLogin' [-Wunused-parameter]
     50 |         virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
        |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
  ..\vnpy_ctp\api\include/ctp/ThostFtdcMdApi.h:50:105: warning: unused parameter 'pRspInfo' [-Wunused-parameter]

==========================中间省略掉N行,要不发送不成功=========================================
1375 | virtual void onRspQryOffsetSetting(const dict& data, const dict& error, int reqid, bool last) {};
| ~~^~
../vnpy_ctp/api/vnctp/vnctptd/vnctptd.h:1375:74: warning: unused parameter 'error' [-Wunused-parameter]
1375 | virtual void onRspQryOffsetSetting(const dict& data, const dict& error, int reqid, bool last) {};
| ~~^~~
../vnpy_ctp/api/vnctp/vnctptd/vnctptd.h:1375:85: warning: unused parameter 'reqid' [-Wunused-parameter]
1375 | virtual void onRspQryOffsetSetting(const dict& data, const dict& error, int reqid, bool last) {};
| ~~^~~
../vnpy_ctp/api/vnctp/vnctptd/vnctptd.h:1375:97: warning: unused parameter 'last' [-Wunused-parameter]
1375 | virtual void onRspQryOffsetSetting(const dict& data, const dict& error, int reqid, bool last) {};
| ~^~
../vnpy_ctp/api/vnctp/vnctptd/vnctptd.cpp: In member function 'void TdApi::processFrontConnected(Task)':
../vnpy_ctp/api/vnctp/vnctptd/vnctptd.cpp:4162:41: warning: unused parameter 'task' [-Wunused-parameter]
4162 | void TdApi::processFrontConnected(Task
task)
| ~
~^~
c++: warning: /MT: linker input file unused because linking not done
c++: error: /MT: linker input file not found: No such file or directory
ninja: build stopped: subcommand failed.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: C:\Users\jopil\AppData\Local\Temp\pip-build-env-_spqx0j5\normal\Scripts\ninja.EXE
[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.

Member
avatar
加入于:
帖子: 5758
声望: 351

是不是环境里还有别的编译器比如mingw

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】