PRBonn/rangenet_lib

compile error: No module named catkin_pkg.package

zhjw0927 opened this issue · 2 comments

I have build a docker container from nvidia/cuda:1.0-base
After I installed the system and python dependencies in the readme, I execute catkin build rangenet_lib, but the following error occurred:
ImportError: "from catkin_pkg.package import parse_package" failed: No module named catkin_pkg.package
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.
CMake Error at /home/zhjw/code/catkin_ws/src/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/usr/bin/python
"/home/zhjw/code/catkin_ws/src/catkin/cmake/parse_package_xml.py"
"/home/zhjw/code/catkin_ws/src/catkin/cmake/../package.xml"
"/home/zhjw/code/catkin_ws/build/catkin/catkin/catkin_generated/version/package.cmake")
returned error code 1

I verified that the library can be imported correctly, as shown below:
**root@c15a10bf59a9:/home/zhjw/code/catkin_ws/src/rangenet_lib# python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

from catkin_pkg.package import parse_package
**

I dont know how to solve, can you help me?

i try export "catkin_pkg" into PYTHONPATH, new issue occurred:
Traceback (most recent call last):
File "/home/zhjw/code/catkin_ws/src/catkin/cmake/parse_package_xml.py", line 40, in
from catkin_pkg.package import parse_package
File "/usr/local/lib/python3.6/dist-packages/catkin_pkg/package.py", line 44, in
from catkin_pkg.condition import evaluate_condition
File "/usr/local/lib/python3.6/dist-packages/catkin_pkg/condition.py", line 17, in
import pyparsing as pp
File "/usr/local/lib/python3.6/dist-packages/pyparsing/init.py", line 115, in
from .util import *
File "/usr/local/lib/python3.6/dist-packages/pyparsing/util.py", line 16
_all_names: List[str] = []
^
SyntaxError: invalid syntax

hope to get your help, thanks!

i try export "catkin_pkg" into PYTHONPATH, new issue occurred: Traceback (most recent call last): File "/home/zhjw/code/catkin_ws/src/catkin/cmake/parse_package_xml.py", line 40, in from catkin_pkg.package import parse_package File "/usr/local/lib/python3.6/dist-packages/catkin_pkg/package.py", line 44, in from catkin_pkg.condition import evaluate_condition File "/usr/local/lib/python3.6/dist-packages/catkin_pkg/condition.py", line 17, in import pyparsing as pp File "/usr/local/lib/python3.6/dist-packages/pyparsing/init.py", line 115, in from .util import * File "/usr/local/lib/python3.6/dist-packages/pyparsing/util.py", line 16 _all_names: List[str] = [] ^ SyntaxError: invalid syntax hope to get your help, thanks!

It seems like a version conflict between python and catkin_pkg. I never met such an error before. I will leave this issue open and see whether others can provide any help.