Open Tdogb opened 5 years ago
Have you confirmed that cmake reported that all python paths were properly configured?
Did you ever find a solution to this? I'm getting the same error as well, Ubuntu 20.04.
I've tried to reproduce this on Ubuntu 18.04. CMake picked up the wrong python config (python 2.7 as executable but python3.6 libs), but that triggered different errors and could be fixed by setting the variables correctly. (python3 setup.py install
, on the other hand, worked like a charm.)
The only way I managed to trigger the very same error was if I navigated to the lcm-python
directory and tried to import lcm. Python would then try to import the local lcm folder instead of the installed lcm package. In that case __init__.py
will raise the exception ('cause there's no _lcm in that folder/"package"). If that's not the case for you, could you provide some more info how to reproduce your issue?
I ran into the same error after installing LCM as described on https://lcm-proj.github.io/build_instructions.html, the reason being that it defaulted to installing for python (Python 2) but not for python3. As hoxovic indicated, setup.py has to be called from python3 install LCM for python3 as well, so after having installed LCM according to the instructions on https://lcm-proj.github.io/build_instructions.html do
cd ../lcm-python
sudo python3 setup.py install
It would be helpful to have a note regarding this in the instruction manual.
when I run "sudo python3 setup.py install" command, I face the below error:
Anyone can help?
If I run "sudo python setup.py install", it can compile successfully, but I will have the same error as @Tdogb when importing lcm.
It looks like you are missing the Python header files.
You can install them by running sudo apt install python3-dev
Using latest release version on Ubuntu 16.04