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

Problem with MAC OS installation with YAML.

asked 2011-03-14 15:08:00 -0600

Sudarshan gravatar image

Hi,

I am trying to install ROS on Macbook (early 2009) running Mac OS X Leopard. I have run into problems regarding pyyaml which is required for installing ROS. Basically, I am able to launch python (v2.6) from the command line and import yaml, but when I run rosinstall (desktop-full) it gives me an import error saying no module named yaml. I have installed py26-yaml, libyaml using macports, but I still am not unable to install ROS. It seems that rosinstall is invoking the wrong version of python (I ran python_select for selecting 2.6 and currently that is the version that is actively used on my computer). So I would like some help in fixing it so that rosinstall invokes the correct version of python.

Thanks, S.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-03-16 15:58:41 -0600

tfoote gravatar image

updated 2011-03-16 16:00:09 -0600

I finally fixed it. Just letting everyone know in case someone else has a similar problem. Basically, the problem with the pyyaml installation is, Mac OS X comes with a Python installation (2.5) which is located at /System/Library/Frameworks/Python.framework/Versions/2.5/

Soft links for python, python-config, python2.5 etc for execs located in the above folder are available at /usr/bin.

Now Macports installs its own version of python (2.6 for ROS) which is located at /opt/localLibrary/Frameworks/Python.framework/Versions2.6/

Now, there are also multiple versions of easy_install the default one catering to python version 2.5. So if we do sudo easy_install -U rosinstall, rosinstall gets installed at /usr/local/bin and when launched references the original python version that came with Mac OS X. Making sure that the Macports bin path appears before /usr/bin doesnt fix this problem. So what I ended up doing is removing the soft links in /usr/bin for the original python installation. Then I used easy_install-2.6 to install rosinstall. Now, heres the tricky part, using this command installs rosinstall at /opt/localLibrary/Frameworks/Python.framework/Versions2.6/bin/rosinstall and /opt/localLibrary/Frameworks/Python.framework/Versions2.6/bin/roslocate. However, these are not included into the PATH variable by defualt. So, I just soft linked rosinstall and roslocate to /opt/local/bin and ran rostinstall. And everything works now! (well it seems to be installing).

From the mailing list archives

edit flag offensive delete link more
0

answered 2011-03-15 04:07:06 -0600

kwc gravatar image

Have you re-run "easy_install rosinstall" after doing the python_select? easy_install can lock a Python binary to a specific version of Python that is active when it is run, so you have to re-run when you select a different Python.

edit flag offensive delete link more

Comments

Yes. I even removed the previously installed egg and reinstalled it again. But still no luck.
Sudarshan gravatar image Sudarshan  ( 2011-03-15 11:00:24 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2011-03-14 15:08:00 -0600

Seen: 5,702 times

Last updated: Mar 16 '11