ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Python problems installing ROS on OS X 10.9

asked 2014-04-09 10:33:15 -0500

JetForMe gravatar image

updated 2016-10-24 08:36:49 -0500

ngrennan gravatar image

As suggested by the helpful folk at the question "Building ROS on OSX 10.9 (solution)", ID 94771 (this forum won't let me post questions with links), I'm opening a new question to deal with the Python issues I'm facing.

Originally, I went through the ROS Hydro brew-based installation instructions. There were a number of issues with individual packages that were addressed in the answer to the question referenced above, but there's also an issue with using Brew's Python, the recommended solution to which is to use the system Python. I'm now trying to do that, but it's not clear to me how to restore the packages needed by Brew and ROS to make that work. The last issue was with upgrading sip (although it's not clear to me if this should be done through Brew or separately, as to keep with the system Python):

https://gist.github.com/wjwwood/3f93c...

I never use Python, and apologize for having very little clue about its environment. Appreciate the help!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-04-09 16:25:11 -0500

William gravatar image

If I were in your shoes, I would:

  • delete my build, devel, and install folder (of my catkin workspace)
  • uninstall python from brew
  • uninstall any brew formulae which used python (sip pyqt pyside pyqwt etc..)
  • remove the contents of the folder /usr/local/lib/python2.7/site-packages
  • and start over.

It is definitely over kill, but in my experience it is very difficult to repair the damage of mixing the system and brew pythons.

edit flag offensive delete link more
0

answered 2014-04-10 23:01:57 -0500

demmeln gravatar image

It probably is easiest to do what @William suggests in his answer. Most people seem to have best experience with system python: http://answers.ros.org/question/11067... . That being said, I have had success with the brewed python so far, but only after patching the cmake findlibpython module (and that patch is far from perfect as it stands).

Specifically your issue about sip looks like it might have been caused by switching to system python. After you switched to system python, the upgrade caused a reinstall, but maybe it was only accidental that there was an update at the time. As @William notes, among other things you need to reinstall (or uninstall and use rosdep to reinstall dependencies) all formulae with python bindings. He lists a few, a few noteable other ones are wxwidgets, pygobject, opencv, vtk, boost, etc. Unfortunately there is no easy way to list all the installed formulae with python bindings. See https://github.com/Homebrew/homebrew/... for a workaround. Note that you should remove the contents of the /usr/local/lib/python2.7/site-packages only before reinstalling the formulae with python bindings, as they get installed there.

Actually, I just had the thought that checking /usr/local/lib/python2.7/site-packages for symlinks into the Cellar should give you a list of installed formulae with python bindings. The other packages in that folder are likely installed through easy_install or pip or manually by you. I believe that with system python, pip packages will get installed into a different location (namely /Library/Python/2.7/site-packages or ~/Library/Python/2.7/lib/python/site-packages for the --user option). That's not a problem, just a note for you.

I also recommend reading https://github.com/Homebrew/homebrew/... before you start. If any more concrete errors pop up, just upadte your question here.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2014-04-09 10:33:15 -0500

Seen: 427 times

Last updated: Apr 10 '14