[ros-users] Pyyaml using easy_install on Mac OS X

S.Sudarshan sudarshan85 at gmail.com
Sun Mar 13 22:42:38 UTC 2011


>
> Hi,


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.

After running sudo easy_install -U pyyaml, I have the following output:

>
> Searching for pyyaml
> Reading http://pypi.python.org/simple/pyyaml/
> Reading http://pyyaml.org/wiki/PyYAML
> Best match: PyYAML 3.09
> Downloading http://pyyaml.org/download/pyyaml/PyYAML-3.09.zip
> 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.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’
> 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?)
>
>  After this I tried several different ways to install pyyaml:

1) I installed libyaml using macports and got the same error.

2) I saw this http://pyyaml.org/ticket/94 ticket and tried to upgrade my
setuptools using macports (sudo port install py26-setuptools) and got the
following error:

>
> --->  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 <http://guide.macports.org/#project.tickets>
>
> When I tried to force activate it as suggested I got this:


> --->  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
>
> 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:


> 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?)
>
> 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.
4) Finally, I got the pyyaml-3.09 source and installed as per the
instructions. It installed without problems,


> 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
>
> Writing
> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PyYAML-3.09-py2.6.egg-info




However, as the next step in the ROS install, I ran this command as
described in the website"
http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=diamondback&variant=ros-full&overlay=no<http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=diamondback&variant=ros-full&overlay=no>"]
and I got the following error:


> 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
>
> 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 pyyaml.org website (http://pyyaml.org/ticket/186), however I
have not received any reply.

Any help on this is greatly appreciated.

Thanks,
S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20110313/64aa9958/attachment-0003.html>


More information about the ros-users mailing list