No module named 'sklearn.linear_model.logistic' even though sklearn already installed

Error

I am getting this error even though I have installed scikit-learn==0.24.2 version.

Installed packages

Requirement already satisfied: sklearn in c:\users\dell\copy-demo\venv\lib\site-packages (0.0)
Requirement already satisfied: scikit-learn in c:\users\dell\copy-demo\venv\lib\site-packages (from sklearn) (0.24.2)
Requirement already satisfied: numpy>=1.13.3 in c:\users\dell\copy-demo\venv\lib\site-packages (from scikit-learn->sklearn) (1.22.3)
Requirement already satisfied: scipy>=0.19.1 in c:\users\dell\copy-demo\venv\lib\site-packages (from scikit-learn->sklearn) (1.8.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\dell\copy-demo\venv\lib\site-packages (from scikit-learn->sklearn) (3.1.0)  
Requirement already satisfied: joblib>=0.11 in c:\users\dell\copy-demo\venv\lib\site-packages (from scikit-learn->sklearn) (1.1.0)

I'm not sure what exactly am I missing. My python version is 3.9, 64bit and system is Windows10.

Edit: I tried using with and without a virtual env and tried running in it shows the same error.

1 answer

  • answered 2022-05-05 05:36 MingJie-MSFT

    Copy the package in the virtual environment to the python library.

    For example, you could copy the packages in \venv\lib\site-packages into \python\lib\site-packages(where your python stays)

    enter image description here

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum