Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential dependency conflicts between fklearn and pandas #135

Open
NeolithEra opened this issue May 13, 2020 · 2 comments
Open

Potential dependency conflicts between fklearn and pandas #135

NeolithEra opened this issue May 13, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@NeolithEra
Copy link

NeolithEra commented May 13, 2020

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

@NeolithEra NeolithEra added the enhancement New feature or request label May 13, 2020
@NeolithEra
Copy link
Author

Suggested Solution

  1. Loosen the version range of pandas to be >=0.24.1.
  2. Remove your direct dependency pandas, and use the pandas transitively introduced by statsmodels.
  3. 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?

@gcbeltramini
Copy link
Contributor

The same comments that I made on #136 apply here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants