Importing with boost python
Whether I import like this:
numpy_module = bp::import("开发者_Go百科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.
Got it: I needed to compile Boost for Python31.
精彩评论