使用 boost python 导入
无论我像这样导入:
numpy_module = bp::import("numpy");
还是这样导入:
numpy_module = bp::scope().attr("numpy");
我发现
terminate called after throwing an instance of 'boost::python::error_already_set'
Python 2.7没有问题,但升级到Python 3.1后,出现了这个奇怪的异常。
Whether I import like this:
numpy_module = bp::import("numpy");
or like this:
numpy_module = bp::scope().attr("numpy");
I get
terminate called after throwing an instance of 'boost::python::error_already_set'
I didn't have a problem with Python 2.7, but after upgrading to Python 3.1, this strange exception crops up.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
明白了:我需要为 Python31 编译 Boost。
Got it: I needed to compile Boost for Python31.