Potential dependency conflicts between fklearn and pandas
NeolithEra opened this issue · comments
Hi, as shown in the following full dependency graph of fklearn, fklearn requires pandas >=0.24.1,<0.25, fklearn requires statsmodels >=0.9.0,<1 (statsmodels 0.11.1 will be installed, i.e., the newest version satisfying the version constraint), and directed dependency statsmodels 0.11.1 transitively introduces pandas >=0.21.
Obviously, there are multiple version constraints set for pandas in this project. However, according to pip's “first found wins” installation strategy, pandas 0.24.2 (i.e., the newest version satisfying constraint >=0.24.1,<0.25) is the actually installed version.
Although the first found package version pandas 0.24.2 just satisfies the later dependency constraint (pandas >=0.21), such installed version is very close to the upper bound of the version constraint of Pandas specified by statsmodels 0.11.1.
Once statsmodels upgrades,its newest version will be installed. Therefore, it will easily cause a dependency conflict (build failure), if the upgraded statsmodels version introduces a higher version of Pandas, violating its another version constraint >=0.24.1,<0.25.
According to the release history of statsmodels, it habitually upgrates Pandas in its recent releases. For instance, statsmodels v0.10.0rc1 upgrated Pandas’s constraint from >=0.15 to >=0.18, statsmodels v0.10.0rc2 upgrated Pandas’s constraint from >=0.18 to >=0.19, and statsmodels v0.11.0rc1 upgrated Pandas’s constraint from >=0.19 to >=0.21.
As such, it is a warm warning of a potential dependency conflict issue for fklearn.
Dependency tree
fklearn - 1.18.0
| +- cloudpickle(install version:0.8.1 version range:>=0.8.0,<0.9.0)
| +- joblib(install version:0.13.2 version range:>=0.13.2,<0.14.0)
| +- numpy(install version:1.16.6 version range:>=1.16.4,<1.17.0)
| +- pandas(install version:0.24.2 version range:>=0.24.1,<0.25)
| +- scikit-learn(install version:0.21.3 version range:>=0.21.2,<0.22.0)
| +- statsmodels(install version:0.11.1 version range:>=0.9.0,<1)
| | +- numpy(install version:1.16.6 version range:>=1.14)
| | +- pandas(install version:0.24.2 version range:>=0.21)
| | +- patsy(install version:0.5.1 version range:>=0.5)
| | | +- numpy(install version:1.16.6 version range:>=1.4)
| | | +- six(install version:1.14.0 version range:*)
| | +- scipy(install version:1.2.3 version range:>=1.0)
| +- toolz(install version:0.10.0 version range:>=0.9.0,<1)
Thanks for your help.
Best,
Neolith
Suggested Solution
- Loosen the version range of pandas to be >=0.24.1.
- Remove your direct dependency pandas, and use the pandas transitively introduced by statsmodels.
- Change your direct dependency statsmodels to be >=0.9.0,<=0.11.1.
@caique-lima Which solution do you prefer, 1 ,2or 3?
Please let me know your choice. May I pull a request to solve this issue?
The same comments that I made on #136 apply here.