“致命Python错误:PyThreadState\u Get:no current thread”是什么意思?

“致命Python错误:PyThreadState\u Get:no current thread”是什么意思?,python,c++,boost,mpi,message-passing,Python,C++,Boost,Mpi,Message Passing,我正在将一个mpi通信器从python传递到C。我选择使用boost的mpi通信器,因为mpi4py似乎没有很好的C支持。请查看: try: from boost.mpi import world except ImportError: from mpi import world err = run_with_mpi(infile, world, stdout, stderr, exc) 在安装了boost.mpi的系统上,这不会引发错误。但是,

我正在将一个mpi通信器从python传递到C。我选择使用boost的mpi通信器,因为mpi4py似乎没有很好的C支持。请查看:

        try: from boost.mpi import world
        except ImportError: from mpi import world
        err = run_with_mpi(infile, world, stdout, stderr, exc)
在安装了boost.mpi的系统上,这不会引发错误。但是,boost.mpi不能安装在mac上。我使用自制的boost155公式安装了boost的mpi.so模块,然后将.so文件添加到pythonpath中

一般来说,
致命Python错误:PyThreadState\u Get:no current thread
意味着什么?这条信息给了像我这样的开发者什么线索

完整错误消息:

Fatal Python error: PyThreadState_Get: no current thread
[kilojoules-20160s:64471] *** Process received signal ***
[kilojoules-20160s:64471] Signal: Abort trap: 6 (6)
[kilojoules-20160s:64471] Signal code:  (0)
[kilojoules-20160s:64471] *** End of error message ***

如果自制公式中的
.so
文件链接到与正在运行的解释器不同的
python
库,则可能会出现此问题,另请参见和

如果没有其他依赖项,那么使用自制的python解释器(应位于
/usr/local/bin/
中)运行程序可以解决此问题