“python_requires” should be set with “>=3.5”, as fklearn 2.0.0 is not compatible with all Python versions.
PyVCEchecker opened this issue · comments
Currently, the keyword argument python_requires of setup() is not set, and thus it is assumed that this distribution is compatible with all Python versions.
However, I found it is not compatible with Python 2. My local Python version is 2.7, and I encounter the following error when executing “pip install fklearn”
Collecting fklearn
Downloading https://files.pythonhosted.org/packages/1a/aa/b1af28f1d63958e50e82a64f69e5c9cf250b717cdf4a115a82fbc028094e/fklearn-2.0.0.tar.gz (60kB)
|████████████████████████████████| 61kB
…
Collecting pandas<2,>=0.24.1
Downloading https://files.pythonhosted.org/packages/61/57/6c233cc63597c6aa6337e717bdeabf791e8b618e9c893922a223e4e41cf4/pandas-0.24.2-cp27-cp27m-win_amd64.whl (8.3MB)
|████████████████████████████████| 8.3MB 393kB/s
ERROR: Could not find a version that satisfies the requirement scikit-learn<0.24.0,>=0.21.2 (from fklearn) (from versions: 0.9, 0.10, 0.11, 0.12, 0.12.1, 0.13, 0.13.1, 0.14, 0.14.1, 0.15.0b1, 0.15.0b2, 0.15.0, 0.15.1, 0.15.2, 0.16b1, 0.16.0, 0.16.1, 0.17b1, 0.17, 0.17.1, 0.18rc2, 0.18, 0.18.1, 0.18.2, 0.19b2, 0.19.0, 0.19.1, 0.19.2, 0.20rc1, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.20.4, 0.21rc2)
ERROR: No matching distribution found for scikit-learn<0.24.0,>=0.21.2 (from fklearn)
Dependencies of this distribution are listed as follows:
joblib>=0.13.2,<2
numpy>=1.16.4,<2
pandas>=0.24.1,<2
scikit-learn>=0.21.2,<0.24.0
statsmodels>=0.9.0,<1
toolz>=0.9.0,<1
I found that scikit-learn>=0.21.2,<0.24.0 requires Python>=3.5, which results in installation failure of fklearn in Python 2.7.
Way to fix:
modify setup() in setup.py, add python_requires keyword argument:
setup(…
python_requires=">=3.5",
…)
Thanks for your attention.
Best regrads,
PyVCEchecker
I think that I saw something similar but with a python requirement of >=3.6.2
but I'm not sure about the specific package with the issue.
Thank you for revealing this issue.
>=3.6.2 is right. The code used the syntax feature variable annotations, and the feature is only compatible with Python 3.6 and above.
Just in case, in this page you can find that restriction, however, I've already created a PR with the python_requires parameter to avoid problems like the one you reported.