Ask Your Question
3

rospack depends1 error, rosdep version?

asked 2014-05-01 02:57:34 -0500

mechanicalmanb gravatar image

updated 2014-05-01 14:48:43 -0500

I am trying to install Hydro on Ubuntu 12.04. I follow the directions straight through, everything seems to install perfectly fine. I make my way through the tutorials until I make it to creating an ROS package. (I'd include the link to the tutorial here as the tutorial itself recommends, but I have insufficient karma to do so).

When I try to run the line " $ rospack depends1 beginner_tutorials "

It throws an error, telling me that my rosdep version needs to be at least 0.10.40. (Sorry I'm on a different computer right now...I will try to reproduce the full error message and post it here in an edit ASAP).

I check my rosdep version with " $ rosdep --version ", and it tells me that I have 0.10.27 installed.

First, I'm very confused: following the tutorials from installation all the way here lead me to install versions that are already out of date and can't work. Did I miss something? I spend the next few hours trying to install some kind of newer version of rosdep, but I think there is something majorly wrong with my python installations (I have a couple versions and I haven't tightly controlled PYTHONPATH, etc. -- I'm new to python and basically never use it).

So bottom line, 3 questions:

  1. Did I miss something in the installation tutorial that would automatically install the proper rosdep version?

  2. If not, can the tutorial change to address this issue somehow?

  3. Can anyone recommend a tutorial on proper installation (and removing improper installation!) and PYTHONPATH setup for the python version that ROS Hydro needs?


EDIT 1: The full error message:

$ rospack depends1 beginner_tutorials
ImportError: No module named rosdep2.rospack
ImportError: No module named rosdep2.rospack
[rospack] Error: could not find python module 'rosdep2.rospack'. is rosdep up-to-date (at least 0.10.4)?

EDIT 2: I added to PYTHONPATH PYTHONPATH=/opt/ros/hydro/lib/python2.7/dist-packages:/usr/lib/pymodules/python2.7/rosdep2 because I found rosdep2/rospack.py in that folder. Now I get a different error:

 $ rospack depends1 beginner_tutorials 
    Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/rosdep2/__init__.py", line 40, in <module>
        from .installers import InstallerContext, Installer, \
      File "/usr/lib/pymodules/python2.7/rosdep2/installers.py", line 35, in <module>
        from rospkg.os_detect import OsDetect
      File "/usr/lib/pymodules/python2.7/rospkg/__init__.py", line 43, in <module>
        from .rospack import RosPack, RosStack, \
      File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 34, in <module>
        from xml.etree.cElementTree import ElementTree
      File "/usr/local/lib/python2.7/xml/etree/cElementTree.py", line 3, in <module>
        from _elementtree import *
    ImportError: /usr/local/lib/python2.7/lib-dynload/_elementtree.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
    Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.7/rosdep2/__init__.py", line 40, in <module>
        from .installers import InstallerContext, Installer, \
      File "/usr/lib/pymodules/python2.7/rosdep2/installers.py", line 35, in <module>
        from rospkg.os_detect import OsDetect
      File "/usr/lib/pymodules ...
(more)
edit retag flag offensive close merge delete

Comments

The latest rosdep version is 0.10.27. Can you please post your exact error message? I guess the error message just said "at least 0.10.4".

Dirk Thomas gravatar imageDirk Thomas ( 2014-05-01 06:26:49 -0500 )edit

What instructions are you following? If you follow these instructions http://wiki.ros.org/hydro/Installation/Ubuntu line for line it should work fine. For us to help you more. You need to provide a lot more details about what steps you are following.

tfoote gravatar imagetfoote ( 2014-05-01 13:39:32 -0500 )edit

Those are the exact instructions I used. Line by line.

mechanicalmanb gravatar imagemechanicalmanb ( 2014-05-01 14:12:37 -0500 )edit

You're doing things that are much too complicated. You must have state on the system which is not standard. I notice /usr/local in your tracebacks suggesting you've installed custom modules. Are there other modifications to the system?

tfoote gravatar imagetfoote ( 2014-05-01 21:35:10 -0500 )edit

I had installed python 2.7.6 and python 3.4 with default options before attempting to install ROS hydro. I agree with you, I think that there are some serious low level conflicts going on here that are beyond my skill. I installed Ubuntu 14.04 and installed ROS Indigo first, which works fine so far.

mechanicalmanb gravatar imagemechanicalmanb ( 2014-05-02 02:18:17 -0500 )edit

5 Answers

Sort by ยป oldest newest most voted
4

answered 2014-09-23 15:40:27 -0500

messidona gravatar image

updated 2014-09-23 16:06:05 -0500

I got the exact same error after installing Indigo on Ubuntu 14.04. All I have done so far is follow exactly the instructions for installing ROS Indigo and the first few pages of the tutorial.

$ rospack depends1 beginner_tutorials 
ImportError: No module named rosdep2.rospack
ImportError: No module named rosdep2.rospack
[rospack] Error: could not find python module 'rosdep2.rospack'. is rosdep up-to-date (at least 0.10.4)?

I ran rosdep --version and I have 0.10.30. I also ran rosdep update but to no avail. Any help would be appreciated.

EDIT: The only other program that had been installed on my Ubuntu distribution was the anaconda ipython distribution. This seemed to be what was causing the problem. I ran $ rm -rf ~/anaconda to remove it and now

$ rospack depends1 beginner_tutorials 
std_msgs
rospy
roscpp

is function. So the problem was that https://www.youtube.com/watch?v=LDZX4... .

edit flag offensive delete link more

Comments

Thank you for your answer, you saved me!

Haifei gravatar imageHaifei ( 2015-09-23 23:32:07 -0500 )edit
4

answered 2016-09-20 04:26:30 -0500

M_Allam gravatar image

pip install rosdep solved it for me

edit flag offensive delete link more

Comments

Yeah me too. I didn't want to uninstall anaconda so I think this is the way to go

samuelwg gravatar imagesamuelwg ( 2017-02-09 21:45:41 -0500 )edit

Ditto. I'm not interested in giving up anaconda as a "fix". First I used "which pip" to make sure my pip was the anaconda version and then using 'pip install rosdep' resolved this for me as well.

philglau gravatar imagephilglau ( 2017-03-17 01:02:27 -0500 )edit

$ pip install rosdep solved the problem for me on ubuntu 18.

hafizas101 gravatar imagehafizas101 ( 2019-09-11 15:38:01 -0500 )edit

You should not install packages with pip if there is a Debian package available. It would overlay the Debian package and therefore you would get newer updates so will likely run into problems in the future.

Dirk Thomas gravatar imageDirk Thomas ( 2019-09-11 18:17:12 -0500 )edit
0

answered 2015-06-13 01:52:42 -0500

https://docs.python.org/2.7/faq/exten...

Because the python version . maybe you have update the python version , and the default how many chars representation unicode have chaged.

only you recompile the ros or python ,make them unicode chars the same.

edit flag offensive delete link more
0

answered 2014-11-20 18:16:00 -0500

candidcypher gravatar image

I am experiencing the same exact thing and haven't installed ipyhon-notebook or anaconda yet.... Very interesting indeed.

edit flag offensive delete link more
0

answered 2014-06-09 04:30:36 -0500

I got same problem. hic I installed python 2.7.6

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-05-01 02:57:34 -0500

Seen: 4,458 times

Last updated: Nov 20 '14