0
$\begingroup$

Rosanswers logo

Hi,

I am trying to install a ros package on ubuntu 16.04 and ros kinetic version. However, the rosdep init seems to give following error:

 
Traceback (most recent call last):
  File "/usr/bin/rosdep", line 3, in 
    from rosdep2.main import rosdep_main
  File "/usr/lib/python2.7/dist-packages/rosdep2/__init__.py", line 45, in 
    from .lookup import RosdepDefinition, RosdepView, RosdepLookup, \
  File "/usr/lib/python2.7/dist-packages/rosdep2/lookup.py", line 44, in 
    from .sources_list import SourcesListLoader
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 49, in 
    from .gbpdistro_support import get_gbprepo_as_rosdep_data, download_gbpdistro_as_rosdep_data
  File "/usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py", line 18, in 
    from .platforms.debian import APT_INSTALLER
  File "/usr/lib/python2.7/dist-packages/rosdep2/platforms/debian.py", line 34, in 
    from rospkg.os_detect import OS_DEBIAN, OS_LINARO, OS_UBUNTU, OS_ELEMENTARY, OS_MX, OsDetect, read_os_release
ImportError: cannot import name OS_MX

This seems some python issue, but I have tried reinstalling: rosdep, ros kinetic, python and even did a reset of bashrc. If I remove the OS_MX, some OS_EMBEDDDED gives import error.

Rospkg version is 1.1.9

What could be the case here?


Originally posted by elementaryshr on ROS Answers with karma: 28 on 2019-05-30

Post score: 0


Original comments

Comment by gvdhoorn on 2019-05-30:
A guess, but seeing as you're on Ubuntu 14.04: it could be that rospkg is not up-to-date enough on your system. Causing rosdep to fail when it tries to import symbols that should be part of rospkg but aren't on your system.

Comment by elementaryshr on 2019-05-30:
Thanks @gvdhoorn,

The rospkg is also up to date (V 1.19)

Comment by gvdhoorn on 2019-05-30:
Did you mean to write 1.1.9?

Comment by gvdhoorn on 2019-05-30:
Just noticed this:

ubuntu 14.04 and ros kinetic version

Kinetic is not supported on Ubuntu 14.04; are you building things from source or is this a typo?

Comment by elementaryshr on 2019-05-30:
I am extreamly sorry, I typed out both the things rather quickly.

The Ubuntu version is 16.04.6 The rospkg is also 1.1.9

I have installed it via package manager.

Comment by Orhan on 2019-05-31:
Have you tried upgrading packages: sudo apt update && sudo apt upgrade before installing?

Comment by elementaryshr on 2019-05-31:
Yes indeed. All the packages are up to date

Comment by Sensenzhl on 2021-12-24:
Have you solved the problem? I meet this problem too today.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Solved the issue by updating pip2. Apparently I had 3 pip installations pip (this should be pip2), pip2, pip3.


Originally posted by elementaryshr with karma: 28 on 2019-05-31

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by fvd on 2020-03-23:
This didn't solve it for me on one of my machines, but for completeness: sudo -H pip2 install --upgrade pip https://askubuntu.com/questions/712339/how-to-upgrade-pip-to-latest

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.