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

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

Open
Afsaneh-Mastouri opened this issue Oct 18, 2020 · 4 comments
Open

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

Afsaneh-Mastouri opened this issue Oct 18, 2020 · 4 comments

Comments

@Afsaneh-Mastouri
Copy link

Afsaneh-Mastouri commented Oct 18, 2020

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

@bodono
Copy link
Owner

bodono commented Oct 19, 2020

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

@Afsaneh-Mastouri
Copy link
Author

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
Copy link
Owner

bodono commented Oct 19, 2020

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
Copy link
Author

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

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

2 participants