bodono / scs-python

Python interface for SCS
MIT License
41 stars 33 forks source link

module '_scs' has no attribute 'sizeof_int' #24

Open Afsaneh-Mastouri opened 4 years ago

Afsaneh-Mastouri commented 4 years ago

Hi,

I installed SCS and cvxpy on my Python 3.6 environment. I can see SCS 2.1.2 in the list. I tried

and in both cases I have got an error,

File "/Users/../anaconda3/envs/py36/lib/python3.6/site-packages/scs/init.py", line 8, in __sizeof_int__ = _scs_direct.sizeof_int() AttributeError: module '_scs' has no attribute 'sizeof_int'

Any suggestions? Thank you

bodono commented 4 years ago

What do you get when you run import scs; print(scs.__version__) ?

Afsaneh-Mastouri commented 4 years ago

Hi

Traceback (most recent call last):

  File "<ipython-input-88-97fdeadba5ba>", line 1, in <module>
    import scs

  File "/Users/afsaneh/anaconda3/envs/py36/lib/python3.6/site-packages/scs/__init__.py", line 8, in <module>
    __sizeof_int__ = _scs_direct.sizeof_int()

AttributeError: module '_scs' has no attribute 'sizeof_int'

This is what I get when I import SCS and

Traceback (most recent call last):

  File "<ipython-input-90-cf800631b0a3>", line 1, in <module>
    print(scs.__version__)

NameError: name 'scs' is not defined

and when I conda list, i can see scs 2.1.2 pypi_0 pypi in the list on the same env

Thank you

bodono commented 4 years ago

What happens when you run:

import _scs_direct; print(_scs_direct.version())

?

I've never seen or heard of anything like this before. The only thing I can think of is that the python version of SCS (which is just a wrapper) is different from the installed binary version. I would suggest doing a deep clean of SCS (deleting everything related to SCS on your machine) and trying to reinstall from scratch.

Afsaneh-Mastouri commented 4 years ago

Interesting print (_scs_direct.version()) 1.2.6

which is different from what I see in the list.. I will try to reinstall. Thank you