Colcon build cannot import name 'autocomplete' from 'argcomplete' [closed]
Hi
I am running (trying) ros2 on ubuntu virtual machine by following a tutorial. When I try to build the package in the workspace, i get this error. Anyone could help? I am thinking that my installation is not correct but i have retried everything...
Thanks, BTW I am a total beginner in Linux and ros...
Traceback (most recent call last):
File "/usr/bin/colcon", line 11, in <module>
load_entry_point('colcon-core==0.6.1', 'console_scripts', 'colcon')()
File "/usr/lib/python3/dist-packages/colcon_core/command.py", line 118, in main
return _main(command_name=command_name, argv=argv)
File "/usr/lib/python3/dist-packages/colcon_core/command.py", line 161, in _main
args = parser.parse_args(args=argv)
File "/usr/lib/python3/dist-packages/colcon_defaults/argument_parser/defaults.py", line 129, in parse_args
return self._parser.parse_args(*args, **kwargs)
File "/usr/lib/python3/dist-packages/colcon_argcomplete/argument_parser/argcomplete/__init__.py", line 85, in parse_args
from argcomplete import autocomplete
ImportError: cannot import name 'autocomplete' from 'argcomplete' (/home/guiljaune/.local/lib/python3.8/site-packages/argcomplete/__init__.py)
Hmm, looks like a problem with the argcomplete installation. What's the output of this command
pip3 freeze | grep argcomplete
inside the virtual machine?argcomplete==1.12.2 colcon-argcomplete==0.3.3
Hmm, I installed
argcomplete
1.12.2
, and the python importfrom argcomplete import autocomplete
succeeds. What's the output ofI see
(/tmp/env3 because I created a venv to test argcomplete 1.12.2)
I don't understand why but I uninstalled argcomplete than source the ros2 setup.bash file and reinstalled the argcomplete and it worked?
FYi I am following a tutorial on Udemy
I have a similar error can you show me how you went about uninstalling argcomplete?