Closed maweki closed 9 years ago
pydot as on PyPI does not work with Python 3. I found a fork that claims Python 3 compatibility.
Pydot isn't a strict requirement for installing. The error was the downloading that was fixed in my branch/pull-request (https://github.com/johnyf/dd/pull/4)
It is not strict in that an "extra" must be requested, e.g., as in pip install dd[dot]
. My comment about pydot compatibility is relevant for this issue insofar as we want dd
to be available via pip
in both Python 2 and 3. The OP does not preclude the extras.
dd is available via pip for python3 because no supported versions are set within pypi. dd in general doesn't work with python3 which is (probably) a rather easy fix.
But we won't do it because one optional dependency does not support python3? Again ignoring the fact that one can allready (try to) install dd for python3.
I'd think, we'd want to do these things in no particular order:
Edit: I haven't checked out dd's dot support but just outputting a dot-string can be done with some string generation which could be a fallback if pydot were not available giving basic dot-support in any environment.
I agree that core should be made compatible with Python 3 and then, if @johnyf prefers, released but without supporting the "dot" extra on Python 3. I.e., I am not arguing that @johnyf should wait on dealing with pydot before moving forward with Python 3. My comment was intended to indicate that this issue should stay open until that optional dependency is addressed.
I support abandoning pydot entirely and can contribute a replacement for desired functions.
I agree that dd
can be updated relatively soon to work in Python 3 (the Cython bindings are expected to already do so, due to the Cython transpiler addressing both Python versions from the same source).
Branch dev
currently contains this candidate update.
About pydot
, it cannot be installed from PyPI (at least not w/o a lot of security-overriding options to pip
, if that's still possible). So, the only installation is possible separately. Therefore, the user can select to install a Python 3 compatible fork, with the same name. There are several pydot
forks already on PyPI.
I will likely contact the author of pydot
and ask about the possibility of adding a maintainer, on both GitHub and PyPI. But that is an independent issue. If that fails, then I think it is time to use a fork.
The author of pydot
appears to have a PyPI entry called pydot3k
that installs a pydot
version that works in Python 3. So, for now, it should suffice to conditionally add pydot
or pydot3k
to the setup.py
requirements, depending on the detected Python version.
Unlike the pydot
entry, the pydot3k
entry is uploaded on PyPI.
So, the claim above that pydot “cannot be installed from PyPI” does not hold -- at least not in Python 3.
Cython appears to support some aspects of Python 2 and 3, but not others. In particular, string conversion from Python string objects to Cython that works in both Python 2 and 3 is tricky and fragile (and was a pain to achieve).
As it says in the title.
when I try to install dd via
pip install --user dd
I get the following errorCollecting dd Using cached dd-0.1.3.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 20, in
File "/tmp/pip-build-ew5h83vp/dd/setup.py", line 4, in
import download
File "/tmp/pip-build-ew5h83vp/dd/download.py", line 7, in
import urllib2
ImportError: No module named 'urllib2'
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ew5h83vp/dd
It does work with
pip2 install --user dd
though. So maybe this package should not be available for python3 maybe