enki-community / enki

A fast 2-D robot simulator. To contact us, please open an issue.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enki does not work Python 3

stephanemagnenat opened this issue · comments

If Python 3 is the default Python version, Enki does not compile properly its Python bindings (see http://paste2.org/U13UWgna)

Hello,
the flag -DPYTHON_EXECUTABLE:FILEPATH=/path/to/python2.7 for cmake fixed the problem for me.

THS-on

Commit db23310 corrects the detection under Python3, but I do not know if bindings work. Thank you for your note, it shows how to force using Python2 while compiling Enki!

It currently fails with:

/tmp/enki/python/enki.cpp: In statischer Elementfunktion »static void* Vector_from_python::convertible(PyObject*)«:
/tmp/enki/python/enki.cpp:108:51: Fehler: »PyInt_Check« wurde in diesem Gültigkeitsbereich nicht definiert
    if (!(PyFloat_Check(item0) || PyInt_Check(item0)))
                                                   ^
/tmp/enki/python/enki.cpp:112:51: Fehler: »PyInt_Check« wurde in diesem Gültigkeitsbereich nicht definiert
    if (!(PyFloat_Check(item1) || PyInt_Check(item1)))
                                                   ^
/tmp/enki/python/enki.cpp:123:51: Fehler: »PyInt_Check« wurde in diesem Gültigkeitsbereich nicht definiert
    if (!(PyFloat_Check(item0) || PyInt_Check(item0)))
                                                   ^
/tmp/enki/python/enki.cpp:127:51: Fehler: »PyInt_Check« wurde in diesem Gültigkeitsbereich nicht definiert
    if (!(PyFloat_Check(item1) || PyInt_Check(item1)))
                                                   ^
make[2]: *** [python/CMakeFiles/pyenki.dir/build.make:63: python/CMakeFiles/pyenki.dir/enki.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:197: python/CMakeFiles/pyenki.dir/all] Fehler 2
make: *** [Makefile:139: all] Fehler 2