【问题标题】:cython and pyinstaller issuecython 和 pyinstaller 问题
【发布时间】:2021-03-19 23:39:01
【问题描述】:

我对 cython 和 pyinstaller 有一个奇怪的问题。

我的代码编译过程过去可以正常工作,然后在 MAC 上发生了一些变化,我进行了一些更新,但现在无法正常工作...

获取我的代码并简单地使用 pyinstaller 可以正常工作 - 没有错误。 获取我的代码并使用 cython 转换为 .so 文件并运行正常 - 没有错误。 从 cython 获取 .so 文件,然后通过 pyinstaller 运行不起作用(它曾经如此)。我收到以下错误:

ImportError: dlopen(/var/folders/95/mfn5xj2s59jgjjch0b8f5jbw0000gn/T/_MEIhKYuUp/WWS_Server.so, 2): Symbol not found: _Py_EnterRecursiveCall
  Referenced from: /var/folders/95/mfn5xj2s59jgjjch0b8f5jbw0000gn/T/_MEIhKYuUp/WWS_Server.so
  Expected in: flat namespace
 in /var/folders/95/mfn5xj2s59jgjjch0b8f5jbw0000gn/T/_MEIhKYuUp/WWS_Server.so

有什么想法可以解决这个问题吗?

  • Mac OS 达尔文
  • Cython 版本 0.29.22
  • pyinstaller 4.2

【问题讨论】:

    标签: python pyinstaller cython


    【解决方案1】:

    我发现问题是我的 python 已升级到 3.9,这导致了问题。回到 3.8 (pyenv) 解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2021-06-25
      • 2021-11-07
      • 1970-01-01
      • 2017-09-29
      • 1970-01-01
      • 2017-04-07
      • 2021-08-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多