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

Syntax errors on pip install on gentoo

asked 2012-04-17 12:46:59 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi, I am trying to install ROS on a 64-bit machine running Gentoo linux. When I run the command -

sudo pip install -U rosinstall vcstools

I get the following errors -

Installing collected packages: rosinstall, vcstools, pyyaml
  Found existing installation: rosinstall 0.6.13
Uninstalling rosinstall:
  Successfully uninstalled rosinstall
  Running setup.py install for rosinstall
changing mode of build/scripts-3.2/rosinstall from 644 to 755
changing mode of build/scripts-3.2/roslocate from 644 to 755
changing mode of build/scripts-3.2/rosws from 644 to 755
changing mode of build/scripts-3.2/rosco from 644 to 755
  File "/usr/lib64/python3.2/site-packages/rosinstall/config_elements.py", line 96
    raise NotImplementedError, "ConfigElement install unimplemented"
                             ^
SyntaxError: invalid syntax


changing mode of /usr/bin/rosws to 755
changing mode of /usr/bin/roslocate to 755
changing mode of /usr/bin/rosco to 755
changing mode of /usr/bin/rosinstall to 755
  Found existing installation: vcstools 0.1.15
Uninstalling vcstools:
  Successfully uninstalled vcstools
  Running setup.py install for vcstools
  File "/usr/lib64/python3.2/site-packages/vcstools/git.py", line 233
    print "vcstools refusing to move away from dangling commit, to protect your work."
                                                                                     ^
SyntaxError: invalid syntax

  File "/usr/lib64/python3.2/site-packages/vcstools/vcs_base.py", line 194
    raise NotImplementedError, "Base class get_version method must be overridden"
                             ^
SyntaxError: invalid syntax


  Found existing installation: PyYAML 3.10
Uninstalling PyYAML:
  Successfully uninstalled PyYAML
  Running setup.py install for pyyaml
checking if libyaml is compilable
x86_64-pc-linux-gnu-gcc -pthread -fPIC -I/usr/include/python3.2 -c build/temp.linux-x86_64-3.2/check_libyaml.c -o build/temp.linux-x86_64-3.2/check_libyaml.o
build/temp.linux-x86_64-3.2/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
compilation terminated.

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)

But then at the bottom it says "Successfully installed rosinstall vcstools pyyaml". So I try to move on to

rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop-full&overlay=no"

but that gives me an error saying there is no module 'headers'. I'm assuming the issue with pip install is the problem. I have gone into the config_elements.py file, removed the ',' causing the syntax error, and tried to pip install again...but it just recreated the file with the syntax error.

I would greatly appreciate it if someone could tell me if they know what is wrong. Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2012-04-17 23:24:01 -0600

Lorenz gravatar image

It seems like Gentoo, similar to Arch, uses python3 per default. I'm not sure if there is a version of pip that uses python2 in Gentoo, but alternatively you should be able to install rosinstall similar to how the Arch rosinstall package does it. Have a look at the tarball linked on this page.

edit flag offensive delete link more
0

answered 2012-07-31 22:44:30 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm having an issue with this as well. I'm on a mac. It seems it's going to the wrong place to find yaml.h

shinkostation:beginner_tutorials sycheng$ sudo pip-2.6 install -U rosinstall
Password:
Downloading/unpacking rosinstall
  Downloading rosinstall-0.6.17.tar.gz (42Kb): 42Kb downloaded
  Running setup.py egg_info for package rosinstall
Downloading/unpacking vcstools (from rosinstall)
  Downloading vcstools-0.1.18.tar.gz
  Running setup.py egg_info for package vcstools
Downloading/unpacking pyyaml (from rosinstall)
  Downloading PyYAML-3.10.zip (364Kb): 364Kb downloaded
  Running setup.py egg_info for package pyyaml
Installing collected packages: rosinstall, vcstools, pyyaml
  Found existing installation: rosinstall 0.6.17
    Uninstalling rosinstall:
      Successfully uninstalled rosinstall
  Running setup.py install for rosinstall
    changing mode of build/scripts-2.6/rosinstall from 644 to 755
    changing mode of build/scripts-2.6/roslocate from 644 to 755
    changing mode of build/scripts-2.6/rosws from 644 to 755
    changing mode of build/scripts-2.6/rosco from 644 to 755
    changing mode of /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/rosco     to 755
    changing mode of         /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/rosinstall to 755
    changing mode of     /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/roslocate to 755
    changing mode of /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/rosws     to 755
  Found existing installation: vcstools 0.1.18
    Uninstalling vcstools:
      Successfully uninstalled vcstools
  Running setup.py install for vcstools
  Found existing installation: PyYAML 3.10
    Uninstalling PyYAML:
      Successfully uninstalled PyYAML
  Running setup.py install for pyyaml
    checking if libyaml is compilable
    /usr/bin/gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -pipe -O2 -fwrapv -DNDEBUG -    g -fwrapv -O3 -Wall -Wstrict-prototypes -    I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c     build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c -o build/temp.macosx-10.6-x86_64-    2.6/check_libyaml.o
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:2:18: error: yaml.h: No such file or     directory
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c: In function ‘main’:
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:5: error: ‘yaml_parser_t’ undeclared     (first use in this function)
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:5: error: (Each undeclared identifier is     reported only once
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:5: error: for each function it appears     in.)
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:5: error: expected ‘;’ before ‘parser’
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:6: error: ‘yaml_emitter_t’ undeclared     (first use in this function)
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:6: error: expected ‘;’ before ‘emitter’
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:8: warning: implicit declaration of     function ‘yaml_parser_initialize’
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:8: error: ‘parser’ undeclared (first use in     this function)
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:9: warning: implicit declaration of     function ‘yaml_parser_delete’
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:11: warning: implicit declaration of     function ‘yaml_emitter_initialize’
    build/temp.macosx-10.6-x86_64-2.6/check_libyaml.c:11: error: ‘emitter’ undeclared (first use     in this function)
    build ...
(more)
edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-04-17 12:46:59 -0600

Seen: 1,277 times

Last updated: Jul 31 '12