Robotics StackExchange | Archived questions

rviz runtime error in groovy at Mac OS X(homebrew)

I would like to use rviz in groovy at Mac OS X (mountain lion). I builded rviz with homebrew described in http://www.ros.org/wiki/groovy/Installation/OSX/Homebrew/Source

rviz doesn't work well. Using python installed by homebrew would cause this problem. If I remove python by brew, rviz works well. But other ros system does't work. Which python should I use. (installed by brew or originally installed)

Error messages were listed below.

$ rosrun rviz rviz
[ INFO] [1358926010.595017000]: rviz version 1.9.20
[ INFO] [1358926010.595069000]: compiled against OGRE version 1.7.4
(Cthugha)
2013-01-23 16:26:50.602 rviz[9407:f0b] *** WARNING: Method
userSpaceScaleFactor in class NSView is deprecated on 10.7 and
later. It should not be used in new applications. Use
convertRectToBacking: instead.
failed to load symbols, rosdep will not function properly
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/rosdep2/rospack.py",
  line 39, in <module>
    from .main import _get_default_RosdepLookup
  File "/usr/local/lib/python2.7/site-packages/rosdep2/main.py", line
  40, in <module>
    import urllib2
  File
  "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py",
  line 94, in <module>
    import httplib
  File
  "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py",
  line 79, in <module>
    import mimetools
  File
  "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/mimetools.py",
  line 6, in <module>
    import tempfile
  File
  "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py",
  line 34, in <module>
    from random import Random as _Random
  File
  "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py",
  line 47, in <module>
    from os import urandom as _urandom
ImportError: cannot import name urandom
[rospack] Error: could not find python module 'rosdep2.rospack'. is
rosdep up-to-date (at least 0.10.4)?
[librospack]: error while executing command
libc++abi.dylib: terminate called throwing an exception
Abort trap: 6

Asked by Yohei Kakiuchi on 2013-01-22 20:39:55 UTC

Comments

Answers

Looks like something is wrong with rosdep, make sure you have the latest version:

sudo pip install -U rosdep

Asked by WilliamWoodall on 2013-01-22 20:42:47 UTC

Comments

rosdep is updated. From this site https://github.com/klen/python-mode/issues/87 , same problem occured in other program. It caused python installed by brew.

Asked by Yohei Kakiuchi on 2013-01-22 20:45:23 UTC

looks like this might be a problem installing Python from homebrew, that ticket you linked seems like the right direction for debugging this.

Asked by WilliamWoodall on 2013-01-22 20:47:38 UTC

William, which python do you use ? Originally installed or installed by homebrew.

Asked by Yohei Kakiuchi on 2013-01-23 20:57:18 UTC

I always use the Python that ships from Apple (2.7)

Asked by WilliamWoodall on 2013-01-23 21:08:03 UTC

I removed python installed by homebrew. And, I removed also installed python libraries in /usr/local/lib/python2.7/site-packages and /usr/local/share/python. After that, I retried install sequence. Then, rviz seemed to work well.

Thanks.

Asked by Yohei Kakiuchi on 2013-01-25 05:40:39 UTC

Comments