I also had some trouble with yaml on my Mac. I solved it by installing py26-yaml:<div><br></div><div>sudo port install py26-yaml</div><div><br></div><div>I'm using python2.6 on OS X 10.6.</div><div><br></div><div>Hope this helps!</div>
<div><br></div><div>Gonçalo Cabrita</div><div>ISR University of Coimbra</div><div>Portugal<br><br><div class="gmail_quote">On Sun, Mar 13, 2011 at 10:42 PM, S.Sudarshan <span dir="ltr"><<a href="mailto:sudarshan85@gmail.com">sudarshan85@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


Hi,</blockquote><div><br></div><div>I am trying to install ROS on a Macbook (early 2009) running Mac OS X Leopard. I am unable to install Pyyaml. I also tried different things to get it installed in different ways but still out of luck. I will list what I've tried and what error I received.</div>


<div><br></div><div>After running sudo easy_install -U pyyaml, I have the following output:</div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


<span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif;font-size:13px"><pre style="background-color:rgb(247, 247, 247);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(215, 215, 215);border-right-color:rgb(215, 215, 215);border-bottom-color:rgb(215, 215, 215);border-left-color:rgb(215, 215, 215);margin-top:1em;margin-right:1.75em;margin-bottom:1em;margin-left:1.75em;padding-top:0.25em;padding-right:0.25em;padding-bottom:0.25em;padding-left:0.25em;overflow-x:auto;overflow-y:auto;background-repeat:initial initial">
Searching for pyyaml
Reading <a href="http://pypi.python.org/simple/pyyaml/" target="_blank">http://pypi.python.org/simple/pyyaml/</a>
Reading <a href="http://pyyaml.org/wiki/PyYAML" target="_blank">http://pyyaml.org/wiki/PyYAML</a>
Best match: PyYAML 3.09
Downloading <a href="http://pyyaml.org/download/pyyaml/PyYAML-3.09.zip" target="_blank">http://pyyaml.org/download/pyyaml/PyYAML-3.09.zip</a>
Processing PyYAML-3.09.zip
Running PyYAML-3.09/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZJ-Kgs/PyYAML-3.09/egg-dist-tmp-4w-rDE
build/temp.mac<span style="background-color:rgb(255, 255, 153);background-repeat:initial initial">osx</span>-10.5-i386-2.5/check_libyaml.c:2:18: error: yaml.h: No such file or directory
build/temp.macosx-10.5-i386-2.5/check_libyaml.c: In function ‘main’:
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:5: error: ‘yaml_parser_t’ undeclared (first use in this function)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:5: error: (Each undeclared identifier is reported only once
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:5: error: for each function it appears in.)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:5: error: syntax error before ‘parser’
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:6: error: ‘yaml_emitter_t’ undeclared (first use in this function)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:8: warning: implicit declaration of function ‘yaml_parser_initialize’
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:8: error: ‘parser’ undeclared (first use in this function)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:9: warning: implicit declaration of function ‘yaml_parser_delete’
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:11: warning: implicit declaration of function ‘yaml_emitter_initialize’
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:11: error: ‘emitter’ undeclared (first use in this function)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:12: warning: implicit declaration of function ‘yaml_emitter_delete’
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:2:18: error: yaml.h: No such file or directory
build/temp.macosx-10.5-i386-2.5/check_libyaml.c: In function ‘main’:
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:5: error: ‘yaml_parser_t’ undeclared (first use in this function)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:5: error: (Each undeclared identifier is reported only once
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:5: error: for each function it appears in.)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:5: error: syntax error before ‘parser’
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:6: error: ‘yaml_emitter_t’ undeclared (first use in this function)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:8: warning: implicit declaration of function ‘yaml_parser_initialize’
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:8: error: ‘parser’ undeclared (first use in this function)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:9: warning: implicit declaration of function ‘yaml_parser_delete’
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:11: warning: implicit declaration of function ‘yaml_emitter_initialize’
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:11: error: ‘emitter’ undeclared (first use in this function)
build/temp.macosx-10.5-i386-2.5/check_libyaml.c:12: warning: implicit declaration of function ‘yaml_emitter_delete’
lipo: can't open input file: /var/tmp//cc9LRgKl.out (No such file or directory)
libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
 specify the option --include-dirs or uncomment and
 modify the parameter include_dirs in setup.cfg)
zip_safe flag not set; analyzing archive contents...
No eggs found in /tmp/easy_install-ZJ-Kgs/PyYAML-3.09/egg-dist-tmp-4w-rDE (setup script problem?)</pre></span></blockquote><div> After this I tried several different ways to install pyyaml:</div><div><span style="font-size:13px"><p style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif">


1) I installed libyaml using macports and got the same error.<br></p><p style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif">2) I saw this <a href="http://pyyaml.org/ticket/94" style="text-decoration:none;color:rgb(187, 0, 0);border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(187, 187, 187)" target="_blank">http://pyyaml.org/ticket/94</a> ticket and tried to upgrade my setuptools using macports (sudo port install py26-setuptools) and got the following error:</p>


<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex;font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif">


<pre style="background-color:rgb(247, 247, 247);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(215, 215, 215);border-right-color:rgb(215, 215, 215);border-bottom-color:rgb(215, 215, 215);border-left-color:rgb(215, 215, 215);margin-top:1em;margin-right:1.75em;margin-bottom:1em;margin-left:1.75em;padding-top:0.25em;padding-right:0.25em;padding-bottom:0.25em;padding-left:0.25em;overflow-x:auto;overflow-y:auto;background-repeat:initial initial">
--->  Computing dependencies for py26-setuptools
--->  Activating py26-setuptools @0.6c11_1
Error: Target org.macports.activate returned: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/easy_install already exists and does not belong to a registered port.  Unable to activate port py26-setuptools. Use 'port -f activate py26-setuptools' to force the activation.
Log for py26-setuptools is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-setuptools/main.log
Error: Status 1 encountered during processing.
To report a bug, see <<a href="http://guide.macports.org/#project.tickets" target="_blank">http://guide.macports.org/#project.tickets</a>></pre></blockquote><div style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif">


When I tried to force activate it as suggested I got this:</div><div style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


<pre style="background-color:rgb(247, 247, 247);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(215, 215, 215);border-right-color:rgb(215, 215, 215);border-bottom-color:rgb(215, 215, 215);border-left-color:rgb(215, 215, 215);margin-top:1em;margin-right:1.75em;margin-bottom:1em;margin-left:1.75em;padding-top:0.25em;padding-right:0.25em;padding-bottom:0.25em;padding-left:0.25em;overflow-x:auto;overflow-y:auto;font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif">
<span style="white-space:normal"><pre style="background-color:rgb(247, 247, 247);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(215, 215, 215);border-right-color:rgb(215, 215, 215);border-bottom-color:rgb(215, 215, 215);border-left-color:rgb(215, 215, 215);margin-top:1em;margin-right:1.75em;margin-bottom:1em;margin-left:1.75em;padding-top:0.25em;padding-right:0.25em;padding-bottom:0.25em;padding-left:0.25em;overflow-x:auto;overflow-y:auto;background-repeat:initial initial">
--->  Activating py26-setuptools
Warning: File /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/easy_install already exists.  Moving to: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/easy_install.mp_1299764382.
Warning: File /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/easy_install-2.6 already exists.  Moving to: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/easy_install-2.6.mp_1299764382.
Error: port activate failed: can't create directory "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info": file already exists</pre></span></pre>


</blockquote><div><span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif">3) Next I got the libyaml source and built it and installed it. After that I tried to install pyyaml again. This time it didnt complain about libyaml not being found, however it still gave me an error. The entire output is quite long, but I got lots of warning about "differ in signedness" along with the following error:</span></div>


<div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


<span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><pre style="background-color:rgb(247, 247, 247);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(215, 215, 215);border-right-color:rgb(215, 215, 215);border-bottom-color:rgb(215, 215, 215);border-left-color:rgb(215, 215, 215);margin-top:1em;margin-right:1.75em;margin-bottom:1em;margin-left:1.75em;padding-top:0.25em;padding-right:0.25em;padding-bottom:0.25em;padding-left:0.25em;overflow-x:auto;overflow-y:auto;background-repeat:initial initial">
<span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif;white-space:normal"><pre style="background-color:rgb(247, 247, 247);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(215, 215, 215);border-right-color:rgb(215, 215, 215);border-bottom-color:rgb(215, 215, 215);border-left-color:rgb(215, 215, 215);margin-top:1em;margin-right:1.75em;margin-bottom:1em;margin-left:1.75em;padding-top:0.25em;padding-right:0.25em;padding-bottom:0.25em;padding-left:0.25em;overflow-x:auto;overflow-y:auto;background-repeat:initial initial">
ext/_yaml.c:17348: warning: pointer targets in passing argument 3 of ‘yaml_mapping_start_event_initialize’ differ in signedness
ld warning: in /usr/local/lib/libyaml.dylib, file is not of required architecture
zip_safe flag not set; analyzing archive contents...
No eggs found in /tmp/easy_install-DpLGbQ/PyYAML-3.09/egg-dist-tmp-NONW0s (setup script problem?)</pre></span></pre></span></blockquote><div><span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><p>


Those are the last few lines of the output. I don't know how to solve this problem, as I am not familiar with python's setuptools.<br></p></span><span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif">4) Finally, I got the pyyaml-3.09 source and installed as per the instructions. It installed without problems,</span></div>


<div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


<span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><pre style="background-color:rgb(247, 247, 247);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(215, 215, 215);border-right-color:rgb(215, 215, 215);border-bottom-color:rgb(215, 215, 215);border-left-color:rgb(215, 215, 215);margin-top:1em;margin-right:1.75em;margin-bottom:1em;margin-left:1.75em;padding-top:0.25em;padding-right:0.25em;padding-bottom:0.25em;padding-left:0.25em;overflow-x:auto;overflow-y:auto;background-repeat:initial initial">
running install
running build
running build_py
running build_ext
running install_lib
running install_egg_info
Removing /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyYAML-3.09-py2.6.egg-info </pre></span><span style="font-family:monospace;white-space:pre-wrap">Writing /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyYAML-3.09-py2.6.egg-info</span></blockquote>


<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

 </blockquote><div><br></div><div><span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif">However, as the next step in the ROS install, I ran this command as described in the website"<a href="http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=diamondback&variant=ros-full&overlay=no" style="text-decoration:none;color:rgb(187, 0, 0);border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(187, 187, 187)" target="_blank"><span style="background-color:initial;padding-left:12px;background-repeat:no-repeat no-repeat"> </span>http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=diamondback&variant=ros-full&overlay=no</a>"] and I got the following error:</span></div>


<div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


<span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><pre style="background-color:rgb(247, 247, 247);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(215, 215, 215);border-right-color:rgb(215, 215, 215);border-bottom-color:rgb(215, 215, 215);border-left-color:rgb(215, 215, 215);margin-top:1em;margin-right:1.75em;margin-bottom:1em;margin-left:1.75em;padding-top:0.25em;padding-right:0.25em;padding-bottom:0.25em;padding-left:0.25em;overflow-x:auto;overflow-y:auto;background-repeat:initial initial">
Traceback (most recent call last):
  File "/usr/local/bin/rosinstall", line 5, in <module>
    pkg_resources.run_script('rosinstall==0.5.16', 'rosinstall')
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 442, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 1167, in run_script
    exec script_code in namespace, namespace
  File "/usr/local/bin/rosinstall", line 23, in <module>
    
ImportError: No module named yaml</pre></span></blockquote><div><span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"><p>which seems to indicate that pyyaml (or yaml?) is still not installed (or its installed in a place where this command is not looking). Right now, I am out of options, I don't know what else to try. I have issued this problem as a new ticket on <a href="http://pyyaml.org" target="_blank">pyyaml.org</a> website (<a href="http://pyyaml.org/ticket/186" target="_blank">http://pyyaml.org/ticket/186</a>), however I have not received any reply.</p>


<p>Any help on this is greatly appreciated.<br></p><p>Thanks,<br></p></span><span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif">S.</span> </div><div>
<span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"></span> </div>
<div><span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"></span></div><div><span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"></span></div>


<div><span style="font-family:Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif"></span></div></span></div>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br></div>