Cvxpy: RuntimeError with numpy 1.16

Created on 24 Jul 2018  路  3Comments  路  Source: cvxgrp/cvxpy

Hi CVXPY Team,

As you can see here, our build bots generate the following error:

Traceback (most recent call last):
  File "/home/travis/build/nipy/dipy/venv/lib/python3.5/site-packages/cvxpy/cvxcore/python/cvxcore.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_cvxcore', [dirname(__file__)])
  File "/home/travis/build/nipy/dipy/venv/lib/python3.5/imp.py", line 297, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_cvxcore'
During handling of the above exception, another exception occurred:

RuntimeError: module compiled against API version 0xd but this version of numpy is 0xc

cvxpy is built with numpy-1.16.0.dev0+977431a

How can I fix that? Did I do something wrong?

Thanks

Most helpful comment

Of 11 builds at the link you provided, only one failed. It's the only what has PRE=1, i.e. the one that tries to use pre-built wheels for dependencies. The only cvxpy distribution available via pip is the source distribution; there are no pre-built wheels. I'm not sure what the behavior of pip is when you install cvxpy in that way, but whatever it is, it seems to not be working.

All 3 comments

Small, initial comment:

From time to time we do get issues with importing cvxcore (https://github.com/cvxgrp/cvxpy/issues?utf8=%E2%9C%93&q=is%3Aissue+ImportError%3A+No+module+named+%27_cvxcore%27). In addition, I've seen several of cvxpy's TravisCI builds mention "RuntimeError: module compiled against API version .... ".

However, I haven't seen these issues one-next-to-another before.

Of 11 builds at the link you provided, only one failed. It's the only what has PRE=1, i.e. the one that tries to use pre-built wheels for dependencies. The only cvxpy distribution available via pip is the source distribution; there are no pre-built wheels. I'm not sure what the behavior of pip is when you install cvxpy in that way, but whatever it is, it seems to not be working.

we have no longer this error since this weekend. It is still an enigma for me (even if I supposed that #558 fix it).

I close it since it is fixed.

Thanks CVXpy Team

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gabriel80808 picture gabriel80808  路  4Comments

Bonnevie picture Bonnevie  路  6Comments

wrossmorrow picture wrossmorrow  路  5Comments

ShreyasFadnavis picture ShreyasFadnavis  路  11Comments

PartheshSoni picture PartheshSoni  路  3Comments