scs-python icon indicating copy to clipboard operation
scs-python copied to clipboard

module '_scs' has no attribute 'sizeof_int'

Open Afsaneh-Mastouri opened this issue 5 years ago • 4 comments

Hi,

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

  • python test/solve_random_cone_prob.py
  • Import SCS

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

Afsaneh-Mastouri avatar Oct 18 '20 22:10 Afsaneh-Mastouri

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

bodono avatar Oct 19 '20 09:10 bodono

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

Afsaneh-Mastouri avatar Oct 19 '20 09:10 Afsaneh-Mastouri

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.

bodono avatar Oct 19 '20 10:10 bodono

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

Afsaneh-Mastouri avatar Oct 19 '20 10:10 Afsaneh-Mastouri