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

Can't install pydot on MacBook Pro OS 10.8.3

asked 2013-06-01 12:28:54 -0500

jjameson18 gravatar image

updated 2014-01-28 17:16:43 -0500

ngrennan gravatar image

I am trying to install ROS on my MacBook Pro, with OS 10.8.3. The installation will not go beyond the installation of pydot. I first execute the command:

rosdep install --from-paths src --ignore-src --rosdistro groovy -y

Then, after moving through several other installations, the program asks for my password:

executing command [sudo pip install -U pydot]
Password:

After giving my password, the following output is given:

Downloading/unpacking pydot
  Running setup.py egg_info for package pydot
    Couldn't import dot_parser, loading of dot files will not be possible.

Downloading/unpacking pyparsing (from pydot)
  Running setup.py egg_info for package pyparsing
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/private/tmp/pip-build-root/pyparsing/setup.py", line 9, in <module> 
        from pyparsing import __version__ as pyparsing_version
      File "pyparsing.py", line 629
       nonlocal limit,foundArity
                 ^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "<string>", line 16, in <module>

File "/private/tmp/pip-build-root/pyparsing/setup.py", line 9, in <module>

   from pyparsing import __version__ as pyparsing_version

File "pyparsing.py", line 629

  nonlocal limit,foundArity

             ^

SyntaxError: invalid syntax

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip-build-root/pyparsing
Storing complete log in /Users/jordanjameson/Library/Logs/pip.log
ERROR: the following rosdeps failed to install
  pip: command [sudo pip install -U pydot] failed

Thanks for any help.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-06-02 07:42:27 -0500

Artem gravatar image

updated 2013-06-04 21:50:37 -0500

I've just had this problem. The problem is in the version on pyparsing which is 2.0.0 and was designed for python 3.0. To resolve the problem you have to downgrade the pyparsing module. If you actually run this line, it will build pydot:

sudo pip install -U pydot  pyparsing==1.5.7

But I don't know how to pass the parameter "pyparsing==1.5.7" to rosdep. Next time you run rosdep install it will fetch again the same 2.0 version of pyparsing.

This is what I did: *UPDATED

    1) sudo pip uninstall pyparsing
    2) sudo pip install https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz
    3) sudo pip install -U pydot pyparsing==1.5.7
try to rosmake, if will not go through repeat above steps and do set 4:
    4) remove this line "pyparsing" from /Library/Python/2.7/site-packages/pydot-1.0.28-py2.7.egg-info/requires.txt or where you store site-packages.
edit flag offensive delete link more
0

answered 2013-06-02 10:31:59 -0500

jjameson18 gravatar image

updated 2013-06-02 10:50:36 -0500

Thanks for the advice. Unfortunately, it doesn't look like it's working. If I input the command

sudo pip install pyparsing==1.5.7

The output is:

Downloading/unpacking pyparsing==1.5.7
  Running setup.py egg_info for package pyparsing
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/private/tmp/pip-build-root/pyparsing/setup.py", line 9, in <module>
       from pyparsing import __version__ as pyparsing_version
      File "pyparsing.py", line 629
        nonlocal limit,foundArity
                     ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/private/tmp/pip-build-root/pyparsing/setup.py", line 9, in <module>

    from pyparsing import __version__ as pyparsing_version

  File "pyparsing.py", line 629

    nonlocal limit,foundArity

                 ^

SyntaxError: invalid syntax

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip-build-root/pyparsing

Not sure where the problem is. If I try to run rosdep install --from-paths src --ignore-src --rosdistro groovy -y, one of first errors I get is Couldn't import dot_parser, loading of dot files will not be possible.

So it seems that importing a dot parser is a problem, but I don't really know what that means or how to go about getting a solution.

edit flag offensive delete link more

Comments

Hmm strange. Did you uninstall pyparsing first? Can you try this pip install https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz

Artem gravatar image Artem  ( 2013-06-02 13:19:17 -0500 )edit

Can you show the output of "which python"?

Artem gravatar image Artem  ( 2013-06-02 13:21:47 -0500 )edit

The output of "which python" is: /usr/bin/python.

jjameson18 gravatar image jjameson18  ( 2013-06-02 13:36:21 -0500 )edit

I can't uninstall pyparsing. When I "sudo uninstall pyparsing" I get: Preparing Uninstall... Uninstall Began... Uninstall Failed... Reason: ErrorMissingBundle

jjameson18 gravatar image jjameson18  ( 2013-06-02 13:38:47 -0500 )edit

When I "sudo pip uninstall pyparsing" I get: Cannot uninstall requirement pyparsing, not installed Storing complete log in /Users/jjameson/Library/Logs/pip.log

jjameson18 gravatar image jjameson18  ( 2013-06-02 13:41:57 -0500 )edit

I successfully installed pyparsing with "sudo pip install https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz". I'm still unsure about how to remove the pyparsing code from the rosdep install.

jjameson18 gravatar image jjameson18  ( 2013-06-02 13:47:07 -0500 )edit

You mean sudo pip uninstall pyparsing? Hmm strange.. actually I did not have this problem until I build python from homebrew. But you are using original python that comes by default.

Artem gravatar image Artem  ( 2013-06-02 15:24:38 -0500 )edit

Ok so it looks as though this has been solved. First, I "sudo pip install https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz". Next, "sudo pip install -U pydot pyparsing==1..5.7". After, these two inputs, the system was ready to build the ROS dependencies. Thanks!

jjameson18 gravatar image jjameson18  ( 2013-06-02 16:29:26 -0500 )edit

Question Tools

Stats

Asked: 2013-06-01 12:28:54 -0500

Seen: 5,274 times

Last updated: Jun 04 '13