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

ImportError: cannot import name 'SOMFactory' #36

Closed
stef8310 opened this issue Aug 30, 2016 · 6 comments · Fixed by #38
Closed

ImportError: cannot import name 'SOMFactory' #36

stef8310 opened this issue Aug 30, 2016 · 6 comments · Fixed by #38

Comments

@stef8310
Copy link

Hello,

I have installed sompy without any errors (https://github.com/sevamoo/SOMPY).
However when i try:

import sompy

I receive an error code:

File "C:\Anaconda3\lib\site-packages\sompy-1.0-py3.5.egg\sompy__init__.py", line 30, in
from sompy import SOMFactory
ImportError: cannot import name 'SOMFactory'

I am using Python 3.5.1 (Anaconda 4.1.1 for Windows)
Any help or suggestions would be greatly appreciated.

Stefan

@sevamoo
Copy link
Owner

sevamoo commented Aug 31, 2016

Hi
Unfortunately, python 3 is not fully compatible yet.
This might be the reason.

@Akshaysehgal2005
Copy link

Akshaysehgal2005 commented Nov 2, 2017

Python 3 isnt the issue here (atleast for this error). He most probably used pip install sompy directly. The direct pip install is not updated and doesnt include SOMFactory and many other modules (atleast for me). I had to download the setup and used the suggested method of installation.

python setup.py install

But, (again for me only) instead of installing it, it created a .egg file in my site-packages folder. So I had to use pip on the local zip folder containing the setup to directly install it.

I also ran into the ipdb conflict after that but it was already resolved by Sevamoo in another thread I think (downgrading it to 0.8.1)

Works like a charm now, on python 2.7 virtualenv

@Clarahi
Copy link

Clarahi commented Jan 31, 2018

Hello all!
I am trying to install SOMpy and I have the exact error as @Akshaysehgal2005. I am working in a virtualenv with python 2.7. I ran python setup.py install, everything seems to be well but then when I run the example: 'module' object has no attribute 'SOMFactory'

could you clarify what did you do exactly when you say: " I had to use pip on the local zip folder containing the setup to directly install it."?

I would very much appreciate it.

thanks! can't wait to use this tool. I used to use the library in matlab in my phd but now I would like to move to python.

thanks!!

@Clarahi
Copy link

Clarahi commented Jan 31, 2018

I solved it. These were my steps if anyone has the same problem.
Downloaded the zip: https://github.com/sevamoo/SOMPY/archive/master.zip
and run:

pip install SOMPY-master.zip
Then I had to install ipdb:
pip install ipdb
And dowgrade it:
pip install ipdb==0.8.1

And now it works!!

@Ali11000000
Copy link

Ali11000000 commented Jul 8, 2018

install V1.0.0 via : pip3 install git+https://github.com/compmonks/SOMPY.git
change ipdb version to: pip install ipdb==0.8.1
now it works!!

@dnsan
Copy link

dnsan commented Nov 4, 2020

Hello, I'd followed your instruction but still get error. Using python 3.79 now. Have I to downgrade to 3.5 ?
pip install SOMPY-master.zip
......
Successfully built SOMPY
Installing collected packages: SOMPY
Attempting uninstall: SOMPY
Found existing installation: SOMPY 1.0
Uninstalling SOMPY-1.0:
Successfully uninstalled SOMPY-1.0
Successfully installed SOMPY-1.1.1

Then
pip install ipdb==0.8.1

But still "AttributeError: module 'sompy' has no attribute 'SOMFactory'". Please help

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

Successfully merging a pull request may close this issue.

6 participants