Coder Social home page Coder Social logo

sklearn-pypi-package's Introduction

CirrusCI Codecov CircleCI Nightly wheels Black PythonVersion PyPi DOI Benchmark

image

scikit-learn is a Python module for machine learning built on top of SciPy and is distributed under the 3-Clause BSD license.

The project was started in 2007 by David Cournapeau as a Google Summer of Code project, and since then many volunteers have contributed. See the About us page for a list of core contributors.

It is currently maintained by a team of volunteers.

Website: https://scikit-learn.org

Installation

Dependencies

scikit-learn requires:

  • Python (>= 3.9)
  • NumPy (>= 1.19.5)
  • SciPy (>= 1.6.0)
  • joblib (>= 1.2.0)
  • threadpoolctl (>= 2.0.0)

Scikit-learn 0.20 was the last version to support Python 2.7 and Python 3.4. scikit-learn 1.0 and later require Python 3.7 or newer. scikit-learn 1.1 and later require Python 3.8 or newer.

Scikit-learn plotting capabilities (i.e., functions start with plot_ and classes end with Display) require Matplotlib (>= 3.3.4). For running the examples Matplotlib >= 3.3.4 is required. A few examples require scikit-image >= 0.17.2, a few examples require pandas >= 1.1.5, some examples require seaborn >= 0.9.0 and plotly >= 5.14.0.

User installation

If you already have a working installation of NumPy and SciPy, the easiest way to install scikit-learn is using pip:

pip install -U scikit-learn

or conda:

conda install -c conda-forge scikit-learn

The documentation includes more detailed installation instructions.

Changelog

See the changelog for a history of notable changes to scikit-learn.

Development

We welcome new contributors of all experience levels. The scikit-learn community goals are to be helpful, welcoming, and effective. The Development Guide has detailed information about contributing code, documentation, tests, and more. We've included some basic information in this README.

Source code

You can check the latest sources with the command:

git clone https://github.com/scikit-learn/scikit-learn.git

Contributing

To learn more about making a contribution to scikit-learn, please see our Contributing guide.

Testing

After installation, you can launch the test suite from outside the source directory (you will need to have pytest >= 7.1.2 installed):

pytest sklearn

See the web page https://scikit-learn.org/dev/developers/contributing.html#testing-and-improving-test-coverage for more information.

Random number generation can be controlled during testing by setting the SKLEARN_SEED environment variable.

Submitting a Pull Request

Before opening a Pull Request, have a look at the full Contributing page to make sure your code complies with our guidelines: https://scikit-learn.org/stable/developers/index.html

Project History

The project was started in 2007 by David Cournapeau as a Google Summer of Code project, and since then many volunteers have contributed. See the About us page for a list of core contributors.

The project is currently maintained by a team of volunteers.

Note: scikit-learn was previously referred to as scikits.learn.

Help and Support

Documentation

Communication

Citation

If you use scikit-learn in a scientific publication, we would appreciate citations: https://scikit-learn.org/stable/about.html#citing-scikit-learn

sklearn-pypi-package's People

Contributors

lesteve avatar mbauman avatar ogrisel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sklearn-pypi-package's Issues

Explain or refer to the brownout strategy in the thrown exception

I became aware of sklearn's deprecation because the exception thrown by this package started showing up in my CI Docker build logs, however because it only happens sometimes and the majority of builds still passed, I chalked it up to a quirk of the build system and figured it was more of a warning than a serious error (also because we only use the sklearn package through another dependency that still refers to it).

I eventually looked at the repository and understood that this error only happened sometimes because of the 'brownout strategy' that was adopted but this is not clear from the error message shown in pip.

It would have been a lot clearer to me that I needed to take action if this was mentioned in the error message shown to users. Since full deprecation is still pretty far in the future and I think other people could be in the same boat as me it would be helpful if the error message could somehow explicitly clarify the implications of this 'brownout strategy'.

not able to install sklearn

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

installing sklearn instead of scikit-learn in preety_confusion_matrix

when trying to install preety_confusion_matrix, every other components installed sucessfully , but sklearn failed collecting metadata

Collecting sklearn<0.1,>=0.0 (from pretty_confusion_matrix)
Downloading sklearn-0.0.post12.tar.gz (2.6 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'

i think it should be scikit-learn instead of sklearn

still error occured

Let's split the data into X_train, X_test, y_train and y_test

We will use X_train and y_train to train the model and X_test and y_test to test the model

from scikit-learn_selecting import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.15, random_state=2)

PIP INSTALL refy version pip 3.9.0

Collecting myterial (from refy==1.0.0.8)
Using cached myterial-1.2.1-py3-none-any.whl (6.3 kB)
Collecting rich (from refy==1.0.0.8)
Using cached rich-13.6.0-py3-none-any.whl.metadata (18 kB)
Collecting bibtexparser (from refy==1.0.0.8)
Using cached bibtexparser-1.4.1.tar.gz (55 kB)
Preparing metadata (setup.py) ... done
Collecting xmltodict (from refy==1.0.0.8)
Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
Collecting sklearn (from refy==1.0.0.8)
Using cached sklearn-0.0.post11.tar.gz (3.6 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

Here is how to fix this error in the main use cases:

  • use 'pip install scikit-learn' rather than 'pip install sklearn'
  • replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)

pip install sklearn

ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4z1gpenz/sklearn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4z1gpenz/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-4z1gpenz/sklearn/pip-egg-info
         cwd: /tmp/pip-install-4z1gpenz/sklearn/
    Complete output (18 lines):
    The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
    rather than 'sklearn' for pip commands.
    
    Here is how to fix this error in the main use cases:
    - use 'pip install scikit-learn' rather than 'pip install sklearn'
    - replace 'sklearn' by 'scikit-learn' in your pip requirements files
      (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
    - if the 'sklearn' package is used by one of your dependencies,
      it would be great if you take some time to track which package uses
      'sklearn' instead of 'scikit-learn' and report it to their issue tracker
    - as a last resort, set the environment variable
      SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
    
    More information is available at
    https://github.com/scikit-learn/sklearn-pypi-package
    
    If the previous advice does not cover your use case, feel free to report it at
    https://github.com/scikit-learn/sklearn-pypi-package/issues/new
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Can we use `dateutil` in `setup.py`?

Since dateutil is not part of Python's standard library, I do not think we can use it in setup.py. (Unless we want to define build dependencies in a pyproject.toml.)

hgboost library uses a deprecated version of scikit-learn

I am currently trying to "pip install hgboost" in my conda environment python version 3.11.8.
However, I've noticed that whatever the version of the library hgboost, it uses the deprecated version of scikit-learn : sklearn (For extra details, please check details below) :

"""
Collecting hgboost
Using cached hgboost-1.1.5-py3-none-any.whl.metadata (10 kB)
Collecting datazets (from hgboost)
Using cached datazets-0.1.9-py3-none-any.whl.metadata (4.7 kB)
Collecting pypickle (from hgboost)
Using cached pypickle-1.1.0-py3-none-any.whl (5.1 kB)
Collecting matplotlib (from hgboost)
Using cached matplotlib-3.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.8 kB)
Requirement already satisfied: numpy in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from hgboost) (1.26.4)
Requirement already satisfied: pandas in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from hgboost) (2.2.0)
Requirement already satisfied: tqdm in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from hgboost) (4.66.2)
Collecting hyperopt (from hgboost)
Using cached hyperopt-0.2.7-py2.py3-none-any.whl (1.6 MB)
Requirement already satisfied: lightgbm>=4.1.0 in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from hgboost) (4.3.0)
Collecting catboost (from hgboost)
Using cached catboost-1.2.2-cp311-cp311-manylinux2014_x86_64.whl.metadata (1.2 kB)
Collecting xgboost (from hgboost)
Using cached xgboost-2.0.3-py3-none-manylinux2014_x86_64.whl.metadata (2.0 kB)
Collecting classeval (from hgboost)
Using cached classeval-0.2.2-py3-none-any.whl.metadata (5.4 kB)
Collecting treeplot (from hgboost)
Using cached treeplot-0.1.16-py3-none-any.whl (8.7 kB)
Collecting df2onehot (from hgboost)
Using cached df2onehot-1.0.6-py3-none-any.whl.metadata (3.3 kB)
Collecting colourmap (from hgboost)
Using cached colourmap-1.1.16-py3-none-any.whl.metadata (4.1 kB)
Collecting seaborn (from hgboost)
Using cached seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)
Requirement already satisfied: scipy in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from lightgbm>=4.1.0->hgboost) (1.12.0)
Collecting graphviz (from catboost->hgboost)
Using cached graphviz-0.20.1-py3-none-any.whl (47 kB)
Collecting plotly (from catboost->hgboost)
Using cached plotly-5.19.0-py3-none-any.whl.metadata (7.0 kB)
Requirement already satisfied: six in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from catboost->hgboost) (1.16.0)
Requirement already satisfied: python-dateutil>=2.8.2 in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from pandas->hgboost) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from pandas->hgboost) (2024.1)
Requirement already satisfied: tzdata>=2022.7 in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from pandas->hgboost) (2024.1)
Collecting funcsigs (from classeval->hgboost)
Using cached funcsigs-1.0.2-py2.py3-none-any.whl (17 kB)
Requirement already satisfied: scikit-learn in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from classeval->hgboost) (1.4.0)
Requirement already satisfied: requests in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from datazets->hgboost) (2.31.0)
Collecting networkx>=2.2 (from hyperopt->hgboost)
Using cached networkx-3.2.1-py3-none-any.whl.metadata (5.2 kB)
Collecting future (from hyperopt->hgboost)
Using cached future-0.18.3.tar.gz (840 kB)
Preparing metadata (setup.py) ... done
Collecting cloudpickle (from hyperopt->hgboost)
Using cached cloudpickle-3.0.0-py3-none-any.whl.metadata (7.0 kB)
Collecting py4j (from hyperopt->hgboost)
Using cached py4j-0.10.9.7-py2.py3-none-any.whl (200 kB)
Collecting contourpy>=1.0.1 (from matplotlib->hgboost)
Using cached contourpy-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.8 kB)
Collecting cycler>=0.10 (from matplotlib->hgboost)
Using cached cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib->hgboost)
Using cached fonttools-4.49.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (159 kB)
Collecting kiwisolver>=1.3.1 (from matplotlib->hgboost)
Using cached kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.4 kB)
Requirement already satisfied: packaging>=20.0 in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from matplotlib->hgboost) (23.2)
Requirement already satisfied: pillow>=8 in /home/raj/anaconda3/envs/mots-interdits-311/lib/python3.11/site-packages (from matplotlib->hgboost) (10.2.0)
Collecting pyparsing>=2.3.1 (from matplotlib->hgboost)
Using cached pyparsing-3.1.1-py3-none-any.whl.metadata (5.1 kB)
Collecting sklearn (from treeplot->hgboost)
Using cached sklearn-0.0.post12.tar.gz (2.6 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
  - if the 'sklearn' package is used by one of your dependencies,
    it would be great if you take some time to track which package uses
    'sklearn' instead of 'scikit-learn' and report it to their issue tracker
  - as a last resort, set the environment variable
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
  
  More information is available at
  https://github.com/scikit-learn/sklearn-pypi-package
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
"""

python -m pip install refy

Collecting myterial (from refy==1.0.0.8)
Using cached myterial-1.2.1-py3-none-any.whl (6.3 kB)
Collecting rich (from refy==1.0.0.8)
Using cached rich-13.6.0-py3-none-any.whl.metadata (18 kB)
Collecting bibtexparser (from refy==1.0.0.8)
Using cached bibtexparser-1.4.1.tar.gz (55 kB)
Preparing metadata (setup.py) ... done
Collecting xmltodict (from refy==1.0.0.8)
Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
Collecting sklearn (from refy==1.0.0.8)
Using cached sklearn-0.0.post11.tar.gz (3.6 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)

sklearn issue

ImportError Traceback (most recent call last)
Cell In[22], line 1
----> 1 from sklearn.linear_model import linearRegression

ImportError: cannot import name 'linearRegression' from 'sklearn.linear_model' (C:\Users\shrut\anaconda3\Lib\site-packages\sklearn\linear_model_init_.py)

Maintain a list of reverse dependencies of sklearn

We have just got our first container build broken by this error. The containers packages lists are very large (hundreds of packages, mostly in the form of secondary and tertiary dependencies), with many data scientists contributing their desired packages to the installation list. Yet pip is very uninformative as to the source of the problem, failing to show which package has deprecated sklearn in its requirements.

Can you perhaps start a packages blacklist with primary packages that still require sklearn and let Github users maintain it?

sklearn

$ pip install sklearn
Collecting sklearn
Using cached sklearn-0.0.post11.tar.gz (3.6 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
  - if the 'sklearn' package is used by one of your dependencies,
    it would be great if you take some time to track which package uses
    'sklearn' instead of 'scikit-learn' and report it to their issue tracker
  - as a last resort, set the environment variable
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error

  More information is available at
  https://github.com/scikit-learn/sklearn-pypi-package

  If the previous advice does not cover your use case, feel free to report it at
  https://github.com/scikit-learn/sklearn-pypi-package/issues/new
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

error with sklearn

625.6 Downloading sklearn-0.0.post7.tar.gz (3.6 kB)
626.3 ERROR: Command errored out with exit status 1:
626.3 command: /opt/conda/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2vg6w2_d/sklearn/setup.py'"'"'; file='"'"'/tmp/pip-install-2vg6w2_d/skle
arn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --eg
g-base /tmp/pip-install-2vg6w2_d/sklearn/pip-egg-info
626.3 cwd: /tmp/pip-install-2vg6w2_d/sklearn/

i had this problem . can you help ?

pip install timbral_models

Collecting timbral_models
Using cached timbral_models-0.4.0.tar.gz (59 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: numpy in c:\users\cse\anaconda3\envs\speech\lib\site-packages (from timbral_models) (1.26.4)
Requirement already satisfied: soundfile in c:\users\cse\anaconda3\envs\speech\lib\site-packages (from timbral_models) (0.12.1)
Requirement already satisfied: scipy in c:\users\cse\anaconda3\envs\speech\lib\site-packages (from timbral_models) (1.12.0)
Requirement already satisfied: librosa in c:\users\cse\anaconda3\envs\speech\lib\site-packages (from timbral_models) (0.10.1)
Collecting sklearn (from timbral_models)
Using cached sklearn-0.0.post12.tar.gz (2.6 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
error: subprocess-exited-with-error

python setup.py egg_info did not run successfully.
exit code: 1

[15 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

Here is how to fix this error in the main use cases:

use 'pip install scikit-learn' rather than 'pip install sklearn'
replace 'sklearn' by 'scikit-learn' in your pip requirements files
(requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
if the 'sklearn' package is used by one of your dependencies,
it would be great if you take some time to track which package uses
'sklearn' instead of 'scikit-learn' and report it to their issue tracker
as a last resort, set the environment variable
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error

More information is available at
https://github.com/scikit-learn/sklearn-pypi-package
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

How to Resolve

sklearn not being installed

This is the issue i am getting
"note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output."

I can't fix it.

I find these message '
(MachineLearning) C:\Users\Admin>pip install sklearn
Collecting sklearn
Using cached sklearn-0.0.post12.tar.gz (2.6 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
  - if the 'sklearn' package is used by one of your dependencies,
    it would be great if you take some time to track which package uses
    'sklearn' instead of 'scikit-learn' and report it to their issue tracker
  - as a last resort, set the environment variable
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error

  More information is available at
  https://github.com/scikit-learn/sklearn-pypi-package
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

(MachineLearning) C:\Users\Admin>pip install sklearn
Collecting sklearn
Using cached sklearn-0.0.post12.tar.gz (2.6 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
  - if the 'sklearn' package is used by one of your dependencies,
    it would be great if you take some time to track which package uses
    'sklearn' instead of 'scikit-learn' and report it to their issue tracker
  - as a last resort, set the environment variable
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error

  More information is available at
  https://github.com/scikit-learn/sklearn-pypi-package
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.'

installing Pypi on ubuntu python3.8

Dear sirs, I have Python 3.8 installed on Ubuntu. I can not install Pypi on my system. I get errors like:
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
  - if the 'sklearn' package is used by one of your dependencies,
    it would be great if you take some time to track which package uses
    'sklearn' instead of 'scikit-learn' and report it to their issue tracker
  - as a last resort, set the environment variable
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
  
  More information is available at
  https://github.com/scikit-learn/sklearn-pypi-package
  
  If the previous advice does not cover your use case, feel free to report it at
  https://github.com/scikit-learn/sklearn-pypi-package/issues/new
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

scikit learn installation issue

when i run this pip install sklearn it is showing can anybody help me how to resolve
Collecting sklearn
Using cached sklearn-0.0.post7.tar.gz (3.6 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

  https://github.com/scikit-learn/sklearn-pypi-package/issues/new
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

The 'sklearn' PyPI package is Deprecated

use pip install scikit-learn rather than pip install sklearn
replace sklearn by scikit-learn in your pip requirements files (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
if the sklearn package is used by one of your dependencies it would be great if you take some time to track which package uses sklearn instead of scikit-learn and report it to their issue tracker
as a last resort, set the environment variable SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
If the previous advice does not cover your use case, feel free to open an issue about it.

Reason for the deprecation :-
sklearn package on PyPI exists to prevent malicious actors from using the sklearn package, since sklearn (the import name) and scikit-learn (the project name) are sometimes used interchangeably. scikit-learn is the actual package name and should be used with pip, e.g. for:

pip commands: pip install scikit-learn
pip requirement files (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
At the time of writing (October 2022) sklearn downloads is about 1/5 of the scikit-learn downloads on PyPI so a lot of people are using it.

There are some edge cases with the way the PyPI sklearn package is implemented:

pip install sklearn==1.1.3 will say that the 1.1.3 version does not exist, which is confusing. The only available version at the time of writing of sklearn is 0.0.
pip uninstall sklearn will actually not uninstall scikit-learn, you can still do import sklearn afterwards
it can be confusing to have both sklearn and scikit-learn in the pip list output, prompting questions like "why do I have scikit-learn 1.1.3 and sklearn 0.0, and what does it even mean"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.