Hi Guys,
I cloned the github repository (current master) and built it with cmake. To use python3 I set explicit to use python3 like below. I don't install it system wide therefore I use the CMAKE_INSTALL_PREFIX path. My System is using default python2.7 but python3 is also available. I want to use lcm with my python3 script that is why I had to force cmake to use the python3 installation.
mkdir build
cd build
cmake -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.4m.so.1 -DCMAKE_INSTALL_PREFIX=/home/USER/Tools/lcm/install/ ..
python3
Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lcm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/USER/Tools/lcm/install/lib/python3/dist-packages/lcm/__init__.py", line 3, in <module>
from ._lcm import LCM, LCMSubscription
ImportError: /home/USER/Tools/lcm/install/lib/python3/dist-packages/lcm/_lcm.so: undefined symbol: PyInt_AsLong
Unfortunately I'm not a python expert.. Does someone have a Idea ?
Regards,
jobro