pydot / pydot-ng

Python interface to Graphviz's Dot language compatible with Python 2 nad Python 3
MIT License
23 stars 10 forks source link

[81] pydot depends on pyparsing, the newest version of which is Py3 only #17

Closed prmtl closed 6 years ago

prmtl commented 9 years ago

Reported by WJWwood, 2013-03-04T02:01:22Z

What steps will reproduce the problem?
  1. Try to install pydot from pip on OS X.
    What is the expected output? What do you see instead?

That it installs correctly.

What version of the product are you using? On what operating system?

pydot 1.0.28 on OS X 10.8.2

Please provide any additional information below.

Probably just need an versioned depend on pyparsing, something like:

Index: setup.py
===================================================================
--- setup.py    (revision 29)
+++ setup.py    (working copy)
@@ -31,5 +31,5 @@
         'Topic :: Software Development :: Libraries :: Python Modules'],
     long_description = "\n".join(pydot.__doc__.split('\n')),
     py_modules = ['pydot', 'dot_parser'],
-    install_requires = ['pyparsing', 'setuptools'],
+    install_requires = ['pyparsing<2.0.0', 'setuptools'],
     data_files = [('.', ['LICENSE', 'README'])] )

From: https://code.google.com/p/pydot/issues/detail?id=81

prmtl commented 9 years ago

Comment by WJWwood, 2013-03-03T17:02:49Z

Here is the original error output:

https://gist.github.com/wjwwood/5079212

And the related thread I found:

http://sourceforge.net/projects/pyparsing/forums/forum/337293/topic/6481050

prmtl commented 9 years ago

Comment by dev.yei...@gmail.com, 2013-03-25T17:00:05Z

I came to raise this exact issue.

prmtl commented 9 years ago

Comment by inactiv...@gmail.com, 2013-04-26T06:45:36Z

Obvious to the initiated but not to the newbie: The workaround is to install pyparsing < 2.0.0 prior to installing pydot (or a package that depends on pydot.)

$ pip install pyparsing==1.5.7

prmtl commented 9 years ago

Comment by WJWwood, 2013-04-26T09:46:18Z

Thanks I forgot to post the workaround I used.

Shameless bump, in the mean time I would say that pydot version depending on pyparsing would help keep users from hitting this same issue. I would be in favor of dropping the version dependency again after one or more of the major operating systems comes with Python3.x as the default version of Python. Until then its my opinion that we should flip this around and required the Python3 users to get the correct version of pyparsing manually.

prmtl commented 9 years ago

Comment by sh...@shishnet.org, 2013-07-02T01:41:59Z

Also came here to report this issue; but also, have a solution -- since the setup.py is just a python file, could one do something like this?

if python.version >= 3.0: install_requires = ['pyparsing', 'setuptools'] else: install_requires = ['pyparsing < 2.0.0', 'setuptools']

prmtl commented 9 years ago

Comment by WJWwood, 2013-07-02T10:09:38Z

I agree that would be a good solution also, either way I know a tonne of people in our community are running into this problem and we have to keep pointing them to this issue...

prmtl commented 9 years ago

Comment by ptmcg...@gmail.com, 2013-08-03T02:56:41Z

Have things improved since the release of pyparsing 2.0.1 is backward compatible to Python 2.6 and 2.7?

prmtl commented 9 years ago

Comment by WJWwood, 2013-08-03T11:24:33Z

I can now install pydot against pyparsing 2.0.1, but now I get:

>>> import pydot
Couldn't import dot_parser, loading of dot files will not be possible.

Which is probably worth a new ticket here (if there isn't already one), see:

http://stackoverflow.com/questions/15951748/pydot-and-graphviz-error-couldnt-import-dot-parser-loading-of-dot-files-will

prmtl commented 9 years ago

Comment by grizzly.nyo, 2013-08-31T04:37:26Z

in dot_patser.py:

'_' prefixed variables should be considered private to the module!

prmtl commented 9 years ago

Comment by david.vi...@gmail.com, 2014-01-30T08:54:47Z

See http://stackoverflow.com/a/21462609/722624

prmtl commented 9 years ago

Comment by sandro.tosi, 2014-03-11T12:16:15Z

This is the patch i'm about to apply to the Debian package Attached support-pyparsing-v2.patch (view on Gist)

prmtl commented 9 years ago

Comment by mar...@martindengler.com, 2014-03-12T07:03:09Z

Sandro, thanks for the patch.

prmtl commented 9 years ago

Comment by mar...@martindengler.com, 2014-04-11T07:52:24Z

Is there any possibility of getting a pydot release with sandro.tosi's patch?

prmtl commented 9 years ago

Comment by davcl...@gmail.com, 2014-08-08T11:30:25Z

To clarify, if you look at the last stackoverflow link, there's a fork with the patch applied. But yeah - this is a major issue. Bump?

prmtl commented 9 years ago

Comment by asilen...@mirantis.com, 2015-02-24T08:38:21Z

bump

prmtl commented 6 years ago

pydot-ng and pyparsing version it uses works both on Python 2 and 3.