Ask Your Question
1

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

asked 2013-01-22 19:39:55 -0600

Yohei Kakiuchi gravatar image

updated 2014-01-28 17:14:57 -0600

ngrennan gravatar image

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
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Yohei Kakiuchi
close date 2013-01-25 04:41:31

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-01-25 04:40:39 -0600

Yohei Kakiuchi gravatar image

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.

edit flag offensive delete link more
0

answered 2013-01-22 19:42:47 -0600

WilliamWoodall gravatar image

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

sudo pip install -U rosdep
edit flag offensive delete link more

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.

Yohei Kakiuchi gravatar imageYohei Kakiuchi ( 2013-01-22 19:45:23 -0600 )edit

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

WilliamWoodall gravatar imageWilliamWoodall ( 2013-01-22 19:47:38 -0600 )edit

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

Yohei Kakiuchi gravatar imageYohei Kakiuchi ( 2013-01-23 19:57:18 -0600 )edit

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

WilliamWoodall gravatar imageWilliamWoodall ( 2013-01-23 20:08:03 -0600 )edit

Question Tools

Stats

Asked: 2013-01-22 19:39:55 -0600

Seen: 915 times

Last updated: Jan 25 '13