Skip to content

cvxpy 1.1.7 no longer compatible with numpy<1.20? #1229

@roberthuisman

Description

@roberthuisman

I use python 3.7.9 with cvxpy 1.1.7 and numpy 1.18.1.
However as of Sunday we get an error message that the module is compiled with a newer numpy version. Before the weekend everything was still working.

What happened on sunday 31 january that this throws an error now?
Issue is resolved by upgrading numpy to 1.20, however isnt cvxpy supposed to support numpy>1.15? I want to stay on 1.18.1 still.

import cvxpy as cp
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/cvxpy/init.py:18: in
from cvxpy.atoms import *
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/cvxpy/atoms/init.py:20: in
from cvxpy.atoms.geo_mean import geo_mean
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/cvxpy/atoms/geo_mean.py:20: in
from cvxpy.utilities.power_tools import (fracify, decompose, approx_error, lower_bound,
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/cvxpy/utilities/power_tools.py:18: in
from cvxpy.atoms.affine.reshape import reshape
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/cvxpy/atoms/affine/reshape.py:18: in
from cvxpy.atoms.affine.hstack import hstack
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/cvxpy/atoms/affine/hstack.py:18: in
from cvxpy.atoms.affine.affine_atom import AffAtom
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/cvxpy/atoms/affine/affine_atom.py:22: in
from cvxpy.cvxcore.python import canonInterface
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/cvxpy/cvxcore/python/init.py:3: in
import _cvxcore
E ImportError: numpy.core.multiarray failed to import
------------------------------- Captured stderr --------------------------------
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions