>>> import opengm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/christopher/.virtualenvs/wormvision3/lib/python3.4/site-packages/opengm/__init__.py", line 37
print '[%s]' % self.name
^
SyntaxError: invalid syntax
In file included from /home/christopher/SourceCode/opengm-master/include/opengm/python/opengmpython.hxx:22:0,
from /home/christopher/SourceCode/opengm-master/src/interfaces/python/opengm/hdf5/hdf5.cpp:7:
/home/christopher/SourceCode/opengm-master/include/opengm/python/converter.hxx: In function ‘boost::python::tuple opengm::python::iteratorToTuple(ITERATOR, size_t)’:
/home/christopher/SourceCode/opengm-master/include/opengm/python/converter.hxx:165:64: error: there are no arguments to ‘PyInt_FromLong’ that depend on a template parameter, so a declaration of ‘PyInt_FromLong’ must be available [-fpermissive]
PyTuple_SetItem(tuple, i, PyInt_FromLong(long(iter[i])));
sudo apt-get install libhdf5-serial-dev
TypeError: No registered converter was able to produce a C++ rvalue of type std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > from this Python object of type str
conda install -c anaconda boost=1.61.0
[ 35%] Linking CXX shared module _hdf5.so
Undefined symbols for architecture x86_64:
"_PyEval_InitThreads", referenced from:
init_module__hdf5() in hdf5.cpp.o
"_Py_Initialize", referenced from:
init_module__hdf5() in hdf5.cpp.o
"__Py_NoneStruct", referenced from:
__GLOBAL__sub_I_hdf5.cpp in hdf5.cpp.o
boost::python::detail::caller_arity<3u>::impl<void (*)(opengm::GraphicalModel<double, opengm::Adder, opengm::meta::TypeList<opengm::ExplicitFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsNFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsGFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::TruncatedAbsoluteDifferenceFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::TruncatedSquaredDifferenceFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::SparseFunction<double, unsigned long, unsigned long, std::__1::map<unsigned long, double, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, double> > > >, opengm::meta::TypeList<opengm::functions::learnable::LPotts<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::functions::learnable::LUnary<double, unsigned long, unsigned long>, opengm::meta::ListEnd> > > > > > > > >, opengm::DiscreteSpace<unsigned long, unsigned long> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&), boost::python::default_call_policies, boost::mpl::vector4<void, opengm::GraphicalModel<double, opengm::Adder, opengm::meta::TypeList<opengm::ExplicitFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsNFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsGFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::TruncatedAbsoluteDifferenceFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::TruncatedSquaredDifferenceFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::SparseFunction<double, unsigned long, unsigned long, std::__1::map<unsigned long, double, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, double> > > >, opengm::meta::TypeList<opengm::functions::learnable::LPotts<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::functions::learnable::LUnary<double, unsigned long, unsigned long>, opengm::meta::ListEnd> > > > > > > > >, opengm::DiscreteSpace<unsigned long, unsigned long> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&> >::operator()(_object*, _object*) in pyHdf5.cxx.o
boost::python::detail::caller_arity<3u>::impl<void (*)(opengm::GraphicalModel<double, opengm::Adder, opengm::meta::TypeList<opengm::ExplicitFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsNFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsGFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::TruncatedAbsoluteDifferenceFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::TruncatedSquaredDifferenceFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::SparseFunction<double, unsigned long, unsigned long, std::__1::map<unsigned long, double, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, double> > > >, opengm::meta::TypeList<opengm::functions::learnable::LPotts<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::functions::learnable::LUnary<double, unsigned long, unsigned long>, opengm::meta::ListEnd> > > > > > > > >, opengm::DiscreteSpace<unsigned long, unsigned long> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&), boost::python::default_call_policies, boost::mpl::vector4<void, opengm::GraphicalModel<double, opengm::Adder, opengm::meta::TypeList<opengm::ExplicitFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsNFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::PottsGFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::TruncatedAbsoluteDifferenceFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::TruncatedSquaredDifferenceFunction<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::SparseFunction<double, unsigned long, unsigned long, std::__1::map<unsigned long, double, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, double> > > >, opengm::meta::TypeList<opengm::functions::learnable::LPotts<double, unsigned long, unsigned long>, opengm::meta::TypeList<opengm::functions::learnable::LUnary<double, unsigned long, unsigned long>, opengm::meta::ListEnd> > > > > > > > >, opengm::DiscreteSpace<unsigned long, unsigned long> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&> >::operator()(_object*, _object*) in pyHdf5.cxx.o
__GLOBAL__sub_I_pyHdf5.cxx in pyHdf5.cxx.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/interfaces/python/opengm/hdf5/_hdf5.so] Error 1
make[1]: *** [src/interfaces/python/opengm/hdf5/CMakeFiles/_hdf5.dir/all] Error 2
make: *** [all] Error 2Could you tell me how to fix this?
Best regards