openvax / pyensembl

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

Potential dependency conflicts between pyensembl and numpy #237

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.2 is the actually installed version.

Although the first found package version numpy 1.18.2 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.5
| +- 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:4.0.2 version range:*)
| | +- pandas(install version:1.0.3 version range:>=0.15.2)
| | +- progressbar33(install version:2.4 version range:>=2.4)
| | +- requests(install version:2.23.0 version range:>=2.5.1)
| | | +- certifi(install version:2020.4.5.1 version range:>=2017.4.17)
| | | +- chardet(install version:3.0.4 version range:>=3.0.2,<4)
| | | +- idna(install version:2.9 version range:>=2.5,<3)
| | | +- urllib3(install version:1.25.9 version range:>=1.21.1,<1.26)
| | +- 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.2 version range:>=1.7,<2.0)
| | +- pandas(install version:1.0.3 version range:>=0.15)
| +- memoized-property(install version:1.0.3 version range:>=1.0.2)
| +- numpy(install version:1.18.2 version range:>=1.7)
| +- pandas(install version:1.0.3 version range:>=0.15)
| +- serializable(install version:0.2.1 version range:*)
| | +- simplejson(install version:3.17.0 version range:*)
| | +- six(install version:1.14.0 version range:>=1.9.0)
| | +- typechecks(install version:0.1.0 version range:>=0.0.2)
| +- six(install version:1.14.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

Solution

  1. Loosen the version range of numpy to be >=1.7,<=1.18.2.
  2. Remove your direct dependency numpy, and use the numpy transitively introduced by gtfparse.

@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

Thanks @NeolithEra -- Solution #2 seems easiest, a PR would be much appreciated.

iskandr commented 4 years ago

Actually, I can just do it quickly.