* python package dependencies conflict, pydot, ipython and pyparsings
@ 2023-07-17 13:28 OLIVER HENRIOT
2023-08-18 17:16 ` Simon Tournier
0 siblings, 1 reply; 2+ messages in thread
From: OLIVER HENRIOT @ 2023-07-17 13:28 UTC (permalink / raw)
To: help-guix
Hi Guix!
I'm trying to use both python-pydot and python-ipython and I'm stumbling accross a dependency problem. Pydot specifies pyparsings 2.4.7 as a propagated input. Ipython requires version 3.0.6.
guix package: error: profile contains conflicting entries for python-pyparsing
guix package: error: first entry: python-pyparsing@2.4.7 /gnu/store/m7gzn7yw5g6f3ba3mrkc55pifl757hrb-python-pyparsing-2.4.7
guix package: error: ... propagated from python-pydot@1.4.2
guix package: error: second entry: python-pyparsing@3.0.6 /gnu/store/wlmf5spfdmsjiw6cx30h0rpydfpz3gil-python-pyparsing-3.0.6
guix package: error: ... propagated from python-packaging@21.3
guix package: error: ... propagated from python-sphinx@5.1.1
guix package: error: ... propagated from python-numpydoc@1.5.0
guix package: error: ... propagated from python-ipython@8.5.0
I thought naively that both versions could coexist (they are both present in the store) but there is visibly some magic missing to make this work within my manifest.
I did a dirty hack, copied the content of pydot from graphviz.scm to a personal channel repository package, edited to remove the reference to the pyparsing version and it installs nicely alongside ipython and all the other the packages in my manifest (I did have to disable the tests, `delete 'check)` instead of the existing `replace 'check) sequence as it genrated errors but it should have no impact on dependencies I presume and re-introducing checks "just" requires debugging). Relevant excerpt from my dirty hack package definition:
(define-public my-python-pydot
(package
(name "my-python-pydot")
(version "1.4.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pydot" version))
(sha256
(base32
"0z80zwldf7ffkwrpm28hixsiqp3053j7g281xd6phmnbkfiq3014"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
;; checks disabled for testing
(delete 'sanity-check)
(delete 'check))))
(propagated-inputs
(list python-pyparsing))
(home-page "https://github.com/pydot/pydot")
(synopsis "Python interface to Graphviz's DOT language")
(description
"Pydot provides an interface to create, handle, modify and process
graphs in Graphviz's DOT language, written in pure Python.")
(license license:expat)))
Pydot can then be imported in the python interpreter and a simple graph as given on the project's pypi page ( [ https://pypi.org/project/pydot/ | https://pypi.org/project/pydot/ ] ) works so I presume this is functionnal (haven't run further tests, I don't know pydot syntax well enough). Is there a reason I have missed to specify this precise version of pyparsings as a dependency for pydot in the official repo? If so, can I nonetheless have both ipython and pydot at the same time in my manifest using some magic trick?
Thanks!
Oliver
Oliver Henriot OSUG - ISTerre
ISDeform / RENAg
1381 rue de la piscine
33 (0)4 57 42 18 62
[ https://www.isterre.fr/ | isterre.fr ] [ http://www.univ-grenoble-alpes.fr/ ]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: python package dependencies conflict, pydot, ipython and pyparsings
2023-07-17 13:28 python package dependencies conflict, pydot, ipython and pyparsings OLIVER HENRIOT
@ 2023-08-18 17:16 ` Simon Tournier
0 siblings, 0 replies; 2+ messages in thread
From: Simon Tournier @ 2023-08-18 17:16 UTC (permalink / raw)
To: OLIVER HENRIOT, help-guix
Hi Oliver,
Sorry for the late reply.
On Mon, 17 Jul 2023 at 15:28, OLIVER HENRIOT <oliver.henriot@univ-grenoble-alpes.fr> wrote:
> guix package: error: profile contains conflicting entries for python-pyparsing
> guix package: error: first entry: python-pyparsing@2.4.7 /gnu/store/m7gzn7yw5g6f3ba3mrkc55pifl757hrb-python-pyparsing-2.4.7
> guix package: error: ... propagated from python-pydot@1.4.2
> guix package: error: second entry: python-pyparsing@3.0.6 /gnu/store/wlmf5spfdmsjiw6cx30h0rpydfpz3gil-python-pyparsing-3.0.6
> guix package: error: ... propagated from python-packaging@21.3
> guix package: error: ... propagated from python-sphinx@5.1.1
> guix package: error: ... propagated from python-numpydoc@1.5.0
> guix package: error: ... propagated from python-ipython@8.5.0
>
> I thought naively that both versions could coexist (they are both
> present in the store) but there is visibly some magic missing to make
> this work within my manifest.
Well, that is a “well-known“ issue coming from propagated-inputs. And
sadly, there is few workarounds to my knowledge.
> Is there a reason I have missed
> to specify this precise version of pyparsings as a dependency for
> pydot in the official repo?
Well, python-pyparsing@2.4.7 is the last version supporting Python 2,
but this should not be blocking and maybe removed. However, the package
python-gixy contains the comment:
;; XXX: gixy is incompatible with pyparsing >= 3.x.
;; See <https://github.com/yandex/gixy/pull/132> and
;; <https://github.com/yandex/gixy/pull/122>.
and the package python-pydot contains the comment [1]:
;; XXX: Two test failures with 3.0+:
;; https://github.com/pydot/pydot/issues/277
Somehow the issue is upstream. ;-)
1: <https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/graphviz.scm?id=d1c811268d130041b5af1ba8f8b41cdafe8f08b5#n348>
> If so, can I nonetheless have both ipython
> and pydot at the same time in my manifest using some magic trick?
Well, waiting a better solution, you can try --allow-collisions but (1)
there is no guarantee and (2) it can lead to “strange” behaviour.
Hope that helps,
simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-18 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 13:28 python package dependencies conflict, pydot, ipython and pyparsings OLIVER HENRIOT
2023-08-18 17:16 ` Simon Tournier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).