Python package commands not available in command line after installing from pacman

Hello everyone,

I have a very simple question: I am currently following the instructions to install ROS2 according to the arch wiki (for some reason I can’t include links in this post). Among others, system packages such as python-colcon-core are installed, which should make the command colcon available in my command line. This doesn’t work though - it looks like the command is not added to my PATH. It does work though if I don’t install the system wide package and instead install the package locally with pip. I am using zsh if that makes a difference. What is going on?


Does it work if you switch to bash first?


It does not:
bash: colcon: command not found

Edit: Just checked if the colcon_core package is really installed system wide, and at least importing it seems to work:

➜  ~ colcon
zsh: command not found: colcon
➜  ~ python
Python 3.9.1 (default, Dec 13 2020, 11:55:53) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import colcon_core
>>> vars(colcon_core)
{'__name__': 'colcon_core', '__doc__': None, '__package__': 'colcon_core', '__loader__': <_frozen_importlib_external._NamespaceLoader object at 0x7fabc56d11c0>, '__spec__': ModuleSpec(name='colcon_core', loader=<_frozen_importlib_external._NamespaceLoader object at 0x7fabc56d11c0>, submodule_search_locations=_NamespacePath(['/home/jan/.local/lib/python3.9/site-packages/colcon_core'])), '__file__': None, '__path__': _NamespacePath(['/home/jan/.local/lib/python3.9/site-packages/colcon_core'])}

Of course I opened a new command line after installing.

Edit 2: Just realised that it looks like it’s loading a package installed locally? Running pip uninstall doesn’t work though:

➜  ~ pip uninstall colcon-core
WARNING: Skipping colcon-core as it is not installed.

Looks like something is messed up with my the python package management…

I moved this thread to #support:aur because python-colcon-core is an AUR package.

Maybe you can report the “bug” at the packagers github issue tracker: Issues · acxz/pkgbuilds · GitHub

Thanks for pointing it out, submitted an issue!

1 Like