Код: Выделить всё
from sklearn.datasets._twenty_newsgroups import fetch_20newsgroups
texts = fetch_20newsgroups()
exit(
Код: Выделить всё
ModuleNotFoundError: No module named 'sklearn'
Код: Выделить всё
pip3 install -U scikit-learn script matplotlib
Код: Выделить всё
from sklearn.datasets._twenty_newsgroups import fetch_20newsgroups
texts = fetch_20newsgroups()
exit(
Код: Выделить всё
It seems that scikit-learn has not been built correctly.
If you have installed scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.
If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.
Я снова получил это сообщение об ошибке:
Код: Выделить всё
ImportError: Error importing numpy: you should not try to import numpy
from its source directory; please exit the numpy source tree,
and relaunch your python interpreter from there.
Я использую чип MacOS M1 и версию Python 3.13
Подробнее здесь: https://stackoverflow.com/questions/791 ... de-for-mac