0

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!

2 Answers2

0

The error message is similar to this issue in TensorFlow, which also uses SWIG. It seems to be due to a function call doing something like func(*None)

mattip
  • 2,360
  • 1
  • 13
  • 13
  • Thanks a lot for following up. I'm beginning to think it's probably more time efficient to use the constrained optimization modules of `scipy`, which should be compatible with `pypy`. – Sylvain Chassang Oct 11 '19 at 19:47
0

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

mattip
  • 2,360
  • 1
  • 13
  • 13