pythonalgorithmlibrariessomself-organizing-maps

Library sompy for implementing self-organizing maps


I have installed the library sompy, but when I import it I have the next error:

  import sompy
  
  ImportErrorTraceback (most recent call last)
  <ipython-input-86-97d518356b3c> in <module>
  ----> 1 import sompy

  /opt/conda/lib/python3.8/site-packages/sompy/__init__.py in <module>
  1 
  ----> 2 from sompy import SOM

  ImportError: cannot import name 'SOM' from partially initialized module 'sompy' (most likely due to a circular import) (/opt/conda/lib/python3.8/site-packages/sompy/__init__.py)

Solution

  • This problem is explained here. The solution is to install a newer version of sompy:

    pip3 install git+https://github.com/compmonks/SOMPY.git
    

    There are also other, more up-to-date packages for SOMs available, for example minisom and susi.