Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not import SOM #61

Open
azize opened this issue Feb 25, 2017 · 18 comments
Open

can not import SOM #61

azize opened this issue Feb 25, 2017 · 18 comments

Comments

@azize
Copy link

azize commented Feb 25, 2017

I am using Python 3.5.1 with PyCharm IDE on Windows. I am getting below error:

can you please help me?

C:\Python35\python.exe C:/Users/azzet/PycharmProjects/PythonSom.py
Traceback (most recent call last):
File "C:/Users/azzet/PycharmProjects/PythonSom.py", line 4, in
import sompy
File "C:\Python35\lib\site-packages\sompy_init_.py", line 2, in
from sompy import SOM
ImportError: cannot import name 'SOM'

Process finished with exit code 1

@Nicowhaz
Copy link

I have exactly the same issue

@honorinli151
Copy link

Me too

@sevamoo
Copy link
Owner

sevamoo commented May 25, 2017

Sorry, not tested with Py3. with Py2.7 it should work.

@njali2001
Copy link

Is there any solution for this issue right now?

@sevamoo
Copy link
Owner

sevamoo commented Jul 6, 2017

@compmonks did you have a solution for this? If I remember correctly you used it in py3?
Thanks

@compmonks
Copy link

Sompy would not work when loaded as a package for py 3+ for dependencies and syntax reasons.
@azize @sevamoo , I should have pushed a version for this. Let me know if it works.

@altermarkive
Copy link

I had the same problem and the SOMPY version forked by @compmonks worked for me:

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

I only had to remove ipdb import from sompy.py and mapview.py because due to other dependencies I had installed the ipdb import was opening a prompt in my setup.
Thank you @compmonks for the fork!

@cranzlerdave
Copy link

Have the same issue, but problem appers in my case also in python 2.7. Is there already a solution?

@riverzhou
Copy link

I have exactly the same issue

@dryjins
Copy link

dryjins commented Nov 19, 2017

Same issue. It’s because of ipdb module.Afrer I commented them out in sompy.py and mapview.py, it worked. It’s just debugger

@piaebe
Copy link

piaebe commented Mar 28, 2018

Hi, I have the same issue. @Nomad-Jin What exactly did you comment out? what is 'ipdb'?

@altermarkive
Copy link

altermarkive commented Mar 29, 2018

@pricklpitty - ipdb is a module which gives access the IPython debugger (https://pypi.python.org/pypi/ipdb).
Besides import ipdb in sompy.py and mapview.py there are no other references to that module in the code so it was probably left accidentally after a debugging session...

@yangzhili1992
Copy link

how could i save the model , and predict the cluster of new data , like kmeans in sklearn "model.predict(new_data)"?????????

@rebelgiri
Copy link

Did anyone found the solution for this open issue?

@abdoulsn
Copy link

abdoulsn commented Jun 7, 2021

for me I installed SOMPY using the setup source, this fixed my bug last year. That longtime I've used it.

@mashirali
Copy link

git clone https://github.com/sevamoo/SOMPY.git
cd SOMPY
python setup.py install

This fixed my issue

@dejudicibus
Copy link

I get

Traceback (most recent call last):
File "D:\Projects\AI\SOM\data\sompy_clustering.py", line 3, in
import sompy as sompy
File "C:\Python\lib\site-packages\sompy_init_.py", line 2, in
from sompy import SOM
ImportError: cannot import name 'SOM' from partially initialized module 'sompy' (most likely due to a circular import) (C:\Python\lib\site-packages\sompy_init_.py)

Getting the package from GIT does NOT fix the issue. I have Python 3.10.5

@dimonussir5
Copy link

I get

Traceback (most recent call last):
File "c:\Users\New\Desktop\clone\som\random_distributions.py", line 2, in
from som import simom
ImportError: cannot import name 'simom' from 'som' (C:\Program Files\Python312\Lib\s
ite-packages\som_init_.py)
PS C:\Users\New\Desktop\clone>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests