You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "//python3.9/site-packages/IPython/core/interactiveshell.py", line 3457, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
import spherecluster
File "/snap/pycharm-community/267/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "//python3.9/site-packages/spherecluster/init.py", line 2, in
from .spherical_kmeans import SphericalKMeans
File "/snap/pycharm-community/267/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "//python3.9/site-packages/spherecluster/spherical_kmeans.py", line 7, in
from sklearn.cluster.k_means import (
File "/snap/pycharm-community/267/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self.system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'sklearn.cluster.k_means'
The problem is that 'sklearn.cluster.k_means_' has been renamed to 'sklearn.cluster._kmeans' in some intermediate scikit-learn version.
The text was updated successfully, but these errors were encountered:
I haven't tested it with the most recent version of scikit but I solved this issue for scikit 0.24 in my pull request #34 (you can also check my fork) where the change from sklearn.cluster.k_means_ to sklearn.cluster._kmeans appeared.
From what I remember it was a bit more complicated than a simple renaming issue because some functions called by sklearn.cluster.k_means_ are now class methods of KMeans.
The traceback is
Traceback (most recent call last):
File "//python3.9/site-packages/IPython/core/interactiveshell.py", line 3457, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
import spherecluster
File "/snap/pycharm-community/267/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "//python3.9/site-packages/spherecluster/init.py", line 2, in
from .spherical_kmeans import SphericalKMeans
File "/snap/pycharm-community/267/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "//python3.9/site-packages/spherecluster/spherical_kmeans.py", line 7, in
from sklearn.cluster.k_means import (
File "/snap/pycharm-community/267/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self.system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'sklearn.cluster.k_means'
The problem is that 'sklearn.cluster.k_means_' has been renamed to 'sklearn.cluster._kmeans' in some intermediate scikit-learn version.
The text was updated successfully, but these errors were encountered: