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

The 'sklearn' PyPI package is deprecated, use 'scikit-learn' #51

Closed
BonifazStuhr opened this issue Dec 1, 2023 · 1 comment
Closed

Comments

@BonifazStuhr
Copy link

BonifazStuhr commented Dec 1, 2023

Dear authors,

First of all, thank you very much for your great work! I am happy to use your models in a project of mine. A user of the project has reported an easily fixable problem regarding your requierements.txt here: #BonifazStuhr/feamgan#1 (comment).

It says that "The 'sklearn' PyPI package is deprecated, use 'scikit-learn'". You can therefore simply replace sklearn with scikit-learn in requierements.txt.

I recreated the issue as well. Down below you can see the more detailed error message when installing mseg-semantic with pip install.

3.539 Collecting sklearn
3.557 Downloading sklearn-0.0.post11.tar.gz (3.6 kB)
3.724 ERROR: Command errored out with exit status 1:
3.724 command: /opt/conda/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bfuobfzn/sklearn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bfuobfzn/sklearn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-bfuobfzn/sklearn/pip-egg-info
3.724 cwd: /tmp/pip-install-bfuobfzn/sklearn/
3.724 Complete output (18 lines):
3.724 The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
3.724 rather than 'sklearn' for pip commands.
3.724
3.724 Here is how to fix this error in the main use cases:
3.724 - use 'pip install scikit-learn' rather than 'pip install sklearn'
3.724 - replace 'sklearn' by 'scikit-learn' in your pip requirements files
3.724 (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
3.724 - if the 'sklearn' package is used by one of your dependencies,
3.724 it would be great if you take some time to track which package uses
3.724 'sklearn' instead of 'scikit-learn' and report it to their issue tracker
3.724 - as a last resort, set the environment variable
3.724 SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
3.724
3.724 More information is available at
3.724 https://github.com/scikit-learn/sklearn-pypi-package
3.724
3.724 If the previous advice does not cover your use case, feel free to report it at
3.724 https://github.com/scikit-learn/sklearn-pypi-package/issues/new
3.724 ----------------------------------------
3.758 ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@mseg-dataset
Copy link
Owner

Thank you @BonifazStuhr, fixed now in #52.

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

No branches or pull requests

2 participants