【问题标题】:Is quickfix compatible with pypy?quickfix 与 pypy 兼容吗?
【发布时间】:2022-08-20 02:21:12
【问题描述】:

我只是尝试在 pypy (version 3.8) 下安装包 quickfix (1.15.1) 。

pip install quickfix

quickfix 安装过程失败,出现以下警告和错误:

Building wheel for quickfix (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [66 lines of output]

,

 # include <Python.h>
                 ^~~~~~~~~~
      compilation terminated.
      error: command \'gcc\' failed with exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

我也试过:

升级点 一些其他版本的 quickfix(1.14.1、1.14.2)。

我想知道这个问题是否有解决方案,以及 quickfix 是否与 pypy 兼容。

  • 您需要安装 Python 的开发库。
  • 更具体地说,您需要安装特定于 pypy 的开发库,最有可能命名为 pypy-devpypy3-dev,具体取决于发行版。

标签: python pypy quickfix


【解决方案1】:

谢谢您的回复。

我刚刚安装了 pypy3-dev。 quickfix 安装过程再次失败,出现以下警告和错误(与以前不同):

C++/QuickfixPython.cpp: In function ‘PyTypeObject* SwigPyPacked_TypeOnce()’:
      C++/QuickfixPython.cpp:2132:7: error: invalid conversion from ‘printfunc {aka int (*)(_object*, _IO_FILE*, int)}’ to ‘Py_ssize_t {aka long int}’ [-fpermissive]
             (printfunc)SwigPyPacked_print,        /* tp_print */
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      C++/QuickfixPython.cpp: In member function ‘virtual void SwigDirector_Application::onCreate(const FIX::SessionID&)’:
      C++/QuickfixPython.cpp:5968:11: error: ‘Py_Exit’ was not declared in this scope
                 Py_Exit(1);
                 ^~~~~~~
      C++/QuickfixPython.cpp:5968:11: note: suggested alternative: ‘_Exit’
                 Py_Exit(1);
                 ^~~~~~~
                 _Exit
      C++/QuickfixPython.cpp: In member function ‘virtual void SwigDirector_Application::onLogon(const FIX::SessionID&)’:
      C++/QuickfixPython.cpp:6002:11: error: ‘Py_Exit’ was not declared in this scope
                 Py_Exit(1);
                 ^~~~~~~
      C++/QuickfixPython.cpp:6002:11: note: suggested alternative: ‘_Exit’
                 Py_Exit(1);
                 ^~~~~~~
                 _Exit
      C++/QuickfixPython.cpp: In member function ‘virtual void SwigDirector_Application::onLogout(const FIX::SessionID&)’:
      C++/QuickfixPython.cpp:6036:11: error: ‘Py_Exit’ was not declared in this scope
                 Py_Exit(1);
                 ^~~~~~~
      C++/QuickfixPython.cpp:6036:11: note: suggested alternative: ‘_Exit’
                 Py_Exit(1);
                 ^~~~~~~
                 _Exit
      C++/QuickfixPython.cpp: In member function ‘virtual void SwigDirector_Application::toAdmin(FIX::Message&, const FIX::SessionID&)’:
      C++/QuickfixPython.cpp:6072:11: error: ‘Py_Exit’ was not declared in this scope
                 Py_Exit(1);
                 ^~~~~~~
      C++/QuickfixPython.cpp:6072:11: note: suggested alternative: ‘_Exit’
                 Py_Exit(1);
                 ^~~~~~~
                 _Exit
      C++/QuickfixPython.cpp: In member function ‘virtual void SwigDirector_Application::toApp(FIX::Message&, const FIX::SessionID&)’:
      C++/QuickfixPython.cpp:6114:15: error: ‘Py_Exit’ was not declared in this scope
                     Py_Exit(1);
                     ^~~~~~~
      C++/QuickfixPython.cpp:6114:15: note: suggested alternative: ‘_Exit’
                     Py_Exit(1);
                     ^~~~~~~
                     _Exit
      C++/QuickfixPython.cpp: In member function ‘virtual void SwigDirector_Application::fromAdmin(const FIX::Message&, const FIX::SessionID&)’:
      C++/QuickfixPython.cpp:6176:15: error: ‘Py_Exit’ was not declared in this scope
                     Py_Exit(1);
                     ^~~~~~~
      C++/QuickfixPython.cpp:6176:15: note: suggested alternative: ‘_Exit’
                     Py_Exit(1);
                     ^~~~~~~
                     _Exit
      C++/QuickfixPython.cpp: In member function ‘virtual void SwigDirector_Application::fromApp(const FIX::Message&, const FIX::SessionID&)’:
      C++/QuickfixPython.cpp:6238:15: error: ‘Py_Exit’ was not declared in this scope
                     Py_Exit(1);
                     ^~~~~~~
      C++/QuickfixPython.cpp:6238:15: note: suggested alternative: ‘_Exit’
                     Py_Exit(1);
                     ^~~~~~~
                     _Exit
      C++/QuickfixPython.cpp: In function ‘PyTypeObject* swig_varlink_type()’:
      C++/QuickfixPython.cpp:284462:9: error: invalid conversion from ‘printfunc {aka int (*)(_object*, _IO_FILE*, int)}’ to ‘Py_ssize_t {aka long int}’ [-fpermissive]
               (printfunc) swig_varlink_print,     /* tp_print */
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> quickfix

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-30
    • 1970-01-01
    • 2015-08-09
    • 2018-08-27
    • 2011-12-31
    • 2020-03-19
    • 2018-05-18
    • 1970-01-01
    相关资源
    最近更新 更多