ImportError: cannot import name 'pyparsing_common'

asked 2019-04-15 06:53:31 -0600

ipa-hsd gravatar image

updated 2019-04-15 11:12:05 -0600

Dirk Thomas gravatar image

I am using Ubuntu 16.04 and built ROS2 crystal by source. I was able to build pub/sub example workspace successfully till I upgraded colcon with following commands:

sudo apt install  python3-colcon*
sudo apt update && sudo apt dist-upgrade

Now I get the following error:

[0.196s] ERROR:colcon.colcon_core.entry_point:Exception loading extension 'colcon_core.package_identification.bazel': cannot import name 'pyparsing_common'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 98, in load_entry_points
    extension_type = load_entry_point(entry_point)
  File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 140, in load_entry_point
    return entry_point.load()
  File "/home/hsd/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/home/hsd/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/colcon_bazel/package_identification/bazel.py", line 21, in <module>
    from pyparsing import pyparsing_common
ImportError: cannot import name 'pyparsing_common'

Output of

colcon version-check

is

colcon-argcomplete 0.3.2: up-to-date
colcon-bash 0.3.2: up-to-date
colcon-bazel 0.1.0: up-to-date
colcon-cmake 0.2.9: up-to-date
colcon-core 0.3.20: up-to-date
colcon-defaults 0.2.2: up-to-date
colcon-devtools 0.2.1: up-to-date
colcon-library-path 0.2.1: up-to-date
colcon-metadata 0.2.2: up-to-date
colcon-mixin 0.1.5: up-to-date
colcon-notification 0.2.7: up-to-date
colcon-output 0.2.3: up-to-date
colcon-package-information 0.2.2: up-to-date
colcon-package-selection 0.2.4: up-to-date
colcon-parallel-executor 0.2.4: up-to-date
colcon-pkg-config 0.1.0: up-to-date
colcon-powershell 0.3.4: up-to-date
colcon-python-setup-py 0.2.1: up-to-date
colcon-recursive-crawl 0.2.0: up-to-date
colcon-ros 0.3.10: up-to-date
colcon-test-result 0.3.1: up-to-date
colcon-zsh 0.3.2: up-to-date

I upgraded pyparsing with no luck

sudo -H pip install pyparsing

Edit 1: I downgraded the following packages to versions which were working earlier, again with no luck:

colcon-cmake 0.2.8: newer version available (0.2.9)
colcon-core 0.3.19: newer version available (0.3.20)
colcon-defaults 0.2.1: newer version available (0.2.2)
colcon-metadata 0.2.1: newer version available (0.2.2)
colcon-parallel-executor 0.2.3: newer version available (0.2.4)
colcon-ros 0.3.8: newer version available (0.3.10)
edit retag flag offensive close merge delete

Comments

Dirk Thomas gravatar image Dirk Thomas  ( 2019-04-15 11:14:29 -0600 )edit