openvax / pyensembl

Python interface to access reference genome features (such as genes, transcripts, and exons) from Ensembl
Apache License 2.0
374 stars 65 forks source link

Potential dependency conflicts between pyensembl and numpy #232

Closed NeolithEra closed 4 years ago

NeolithEra commented 4 years ago

Hi, as shown in the following full dependency graph of pyensembl, pyensembl requires numpy >=1.7 , while the installed version of gtfparse(1.2.0) requires numpy >=1.7,<2.0.

According to Pip's “first found wins” installation strategy, numpy 1.18.0 is the actually installed version.

Although the first found package version numpy 1.18.0 just satisfies the later dependency constraint (numpy >=1.7,<2.0), it will lead to a build failure once developers release a newer version of numpy .

Dependency tree--------

pyensembl - 1.8.4
| +- datacache(install version:1.1.5 version range:>=1.1.4)
| | +- appdirs(install version:1.4.3 version range:>=1.4.0)
| | +- mock(install version:3.0.5 version range:*)
| | +- pandas(install version:0.25.3 version range:>=0.15.2)
| | +- progressbar33(install version:2.4 version range:>=2.4)
| | +- requests(install version:2.22.0 version range:>=2.5.1)
| | | +- certifi(install version:2019.11.28 version range:>=2017.4.17)
| | | +- chardet(install version:3.0.4 version range:<3.1.0,>=3.0.2)
| | | +- idna(install version:2.8 version range:>=2.5,<2.9)
| | | +- urllib3(install version:1.25.7 version range:<1.26,>=1.21.1)
| | +- typechecks(install version:0.1.0 version range:>=0.0.2)
| +- gtfparse(install version:1.2.0 version range:>=1.1.0)
| | +- numpy(install version:1.18.0 version range:>=1.7,<2.0)
| | +- pandas(install version:0.25.3 version range:>=0.15)
| +- memoized-property(install version:1.0.3 version range:>=1.0.2)
| +- numpy(install version:1.18.0 version range:>=1.7)
| +- pandas(install version:0.25.3 version range:>=0.15)
| +- serializable(install version:0.2.1 version range:*)
| +- six(install version:1.13.0 version range:>=1.9.0)
| +- tinytimer(install version:0.0.0 version range:*)
| +- typechecks(install version:0.1.0 version range:>=0.0.2)

Thanks for your attention. Best, Neolith

NeolithEra commented 4 years ago

Suggested Solution

  1. Fix your direct dependencies to be numpy<2.0. I have checked this revision will not affect your downstream projects now.
  2. Ask your upstream project gtfparse to loose the version range of numpy to be >=1.7.

@iskandr Which solution do you prefer, 1 or 2? Please let me know your choice. May I pull a request to solve this issue?

iskandr commented 4 years ago

Hey @NeolithEra -- thanks for pointing this out. I think either solution works and a PR for either one would be greatly appreciated. Your call on which is best.

iskandr commented 4 years ago

Changed gtfparse to 'numpy>=1.7',.