Search code examples
pypycvxpy

using CVXPY under PyPy3


I'm trying to use CVXPY under pypy3.6-7.1.1. But I'm getting this error

    def build_lin_op_tree(root_linPy, tmp):
        """
        Breadth-first, pre-order traversal on the Python linOp tree

        Parameters
        -------------
        root_linPy: a Python LinOp tree

        tmp: an array to keep data from going out of scope

        Returns
        --------
        root_linC: a C++ LinOp tree created through our swig interface
        """
        Q = deque()
        root_linC = cvxcore.LinOp()
        Q.append((root_linPy, root_linC))

        while len(Q) > 0:
            linPy, linC = Q.popleft()

            # Updating the arguments our LinOp
            for argPy in linPy.args:
                tree = cvxcore.LinOp()
                tmp.append(tree)
                Q.append((argPy, tree))
>               linC.args.push_back(tree)
E               TypeError: argument after * must be an iterable, not NoneType

Any tips on how to properly install CVXPY under pypy3.6? Thanks!


Solution

  • It turns out the SWIG wrappers were built with an old version of SWIG (3.0.8). Regenerating the wrappers should fix it. See this issue