Home>
Error message
Py 7 series/conda When using the sklearn library in 4.7.12, an error saying No module named 'sklearn.liner_model' appears. The same error occurs even if the library is uninstalled and reinstalled. Hope you can find a solution,
Error message
-------------------------------------------------- -------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-13-d482cac5b107>in<module>
2 import pandas as pd
Three
---->4 from sklearn.liner_model import LogisticRegression
Five
6 df = load_train_data ()
ModuleNotFoundError: No module named 'sklearn.liner_model'
Applicable source code
import numpy as np
import pandas as pd
from sklearn.liner_model import LogisticRegression
df = load_train_data ()
x_train = df.drop (["Survived", "Name", "Ticket", "Fare", "Cabin", "Embarked"], axis = 1)
y_train = df ["Survived"]. values
import sklearn.preprocessing as sp
le = sp.LabelEncoder ()
le.fit (x_train.Sex.unique ())
x_train.Sex = le.fit_transform (x_train.Sex)
Python3.7
pip3 uninstall scikit-learn
↓
pip3 install -U scikit-learn
↓
Confirmed that pip3 freeze was installed
Please provide more detailed information here.
-
Answer # 1
Related articles
- python - the "no module named'torch'" error persists!
- python - i get an import error on an installed module
- python - the py file cannot be executed in the task scheduler 0x2 error
- python - in raspberry pi, the error occurs only in the case of the automatic start program using systemd
- python - categorical_crossentoropy error does not resolve
- readcsv error in python
- python - i want to display an image with pysimplegui, but an error occurs
- python - error when scraping with selenium and firefox
- [python] graphviz output format error
- python 3x - best estimator: i get an error with no syntax, so please tell me what to do
- python - i get an error when connecting to a voice channel with discordpy
- python - ephem module cannot be imported in vscode
- [python] i don't know how to solve the error
- python - an error has occurred in yolo v3
- python - idle cannot resolve the "rootgeometry" error
- python - tuple error does not resolve
- python max () arg is an empty sequence and an error occurs and it cannot be processed well
- python 3x - error after changing to csv file
- python - error in image binarization using cv2adaptivethreshold function
- python - sklearn, svm error
Trends
The spelling of linear is incorrect
xfrom sklearn.liner_model import LogisticRegression
○ from sklearn.linear_model import LogisticRegression