Conda install sklearn6/15/2023 ![]() Requirement already satisfied: joblib>=1.0.0 in c:\users\gfernandez\appdata\local\programs\python\python310\lib\site-packages (from scikit-learn) (1.2. Ive tried to import it like this, but get the same error: pip install scikit-learn1.1.0 -user from trics import DistanceMetric as DistanceMetric ImportError: cannot import name DistanceMetric from trics (D:ProgramasAnacondalibsite-packagessklearnmetricsinit. See the changelog for a history of notable changes to scikit-learn. ![]() Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\gfernandez\appdata\local\programs\python\python310\lib\site-packages (from scikit-learn) (3.1.0) 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. Requirement already satisfied: numpy>=1.17.3 in c:\users\gfernandez\appdata\local\programs\python\python310\lib\site-packages (from scikit-learn) (1.23.4) Requirement already satisfied: scipy>=1.3.2 in c:\users\gfernandez\appdata\local\programs\python\python310\lib\site-packages (from scikit-learn) (1.9.3) Install scikit-learn with pip using /usr/bin/ Python version Install Python using Homebrew, now you have Python in /opt/homebrew/ Then add import scikit-learn in your code The steps above will cause the error because scikit-learn is installed in /usr/bin/, and your code is probably executed using Python from /opt/homebrew/ path. Requirement already satisfied: scikit-learn in c:\users\gfernandez\appdata\local\programs\python\python310\lib\site-packages (1.1.3) This section explains how to enable conda-forge so installation can be done with the command conda install auto-sklearn. ![]() Using cached sklearn-0.0.post1-p圓-none-any.whlĬ:\Users\gfernandez>pip install scikit-learn ![]() In my experience this works: C:\Users\gfernandez>pip install sklearn Use pip install scikit-learn rather than pip install sklearn ![]()
0 Comments
Leave a Reply. |