0
I cannot run the script, because it is accusing that there is no module 'sklearn.externals.six'. I’ve looked for solutions, I’ve remade the venv and not the right one. Has this module become obsolete or something? Please help me out.
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
import pandas as pd
import mglearn
iris_dataset = load_iris()
#print(f'Keys: {iris_dataset}')
'''
train_test_slit() extrai 75% dos dados de iris_dataset['data'] e iris_dataset['target'] para treinar e os outros 25% para teste
'''
X_train, X_test, y_train, y_text = train_test_split(
iris_dataset['data'], iris_dataset['target'], random_state=0)
iris_dataframe = pd.DataFrame(X_train, columns=iris_dataset.feature_names)
grr = pd.plotting.scatter_matrix(iris_dataframe, c=y_train, figsize=(
15, 15), marker='o', hist_kwds={'bins': 20}, s=60, alpha=.8, cmap=mglearn.cm3)
The way out:
Traceback (most recent call last):
File "c:\Users\Paulo\Documents\Cursos\MachineLearningPython\Cap 1\firstMLAlghoritm.py", line 4, in <module>
import mglearn
File "c:\Users\Paulo\Documents\Cursos\MachineLearningPython\venv\lib\site-packages\mglearn\__init__.py", line 1, in <module>
from . import plots
File "c:\Users\Paulo\Documents\Cursos\MachineLearningPython\venv\lib\site-packages\mglearn\plots.py", line 2, in <module>
from .plot_interactive_tree import plot_tree_progressive, plot_tree_partition
File "c:\Users\Paulo\Documents\Cursos\MachineLearningPython\venv\lib\site-packages\mglearn\plot_interactive_tree.py", line 6, in <module>
from sklearn.externals.six import StringIO # doctest: +SKIP
ModuleNotFoundError: No module named 'sklearn.externals.six'
I tried to downgrade, but it says that it does not find a version that satisfies. I used: Pip install sklearn==0.20.4. And the output: ERROR: Could not find a version that satisfies the requirement sklearn==0.20.4 (from versions: 0.0) ERROR: No matching Distribution found for sklearn==0.20.4. I looked at the versions on the site, but I couldn’t downgrade
– Paulo Sérgio