bodono / scs-python

Python interface for SCS
MIT License
41 stars 33 forks source link

Installation problems with 3.2.4 release in Python 3.8 #77

Closed SteveDiamond closed 11 months ago

SteveDiamond commented 11 months ago

Specifications

Description

We are having issues installing the latest SCS release (3.2.4) for Python 3.8 in the CVXPY CI (https://github.com/cvxpy/cvxpy/actions/runs/6805391365/job/18550947595?pr=2288)

SteveDiamond commented 11 months ago

@enzbus

enzbus commented 11 months ago

It looks like it doesn't like the numpy version, it must want one that has some API compatible with the one it was compiled against (which depends on the github yaml file you and @phschiele wrote). I suspect this matters only for the old releases. One fix would be to go and increase the numpy versions in the github yaml. I wanted to trim that down, it's way too complicated, but I didn't have time.

enzbus commented 11 months ago

An even simpler fix is to revert to legacy_setup.py packaging for all versions before 3.12. It would solve also other problems (new packaging enforces blas, before it failed silently if it didn't find it).

bodono commented 11 months ago

Yes it seems like the install is trying to use numpy 1.16.6, whereas the wheel is compiled with numpy=1.19. Can you update the version of numpy the install is using?

SteveDiamond commented 11 months ago

@bodono you mean upgrade the cvxpy python 3.8 CI to use numpy 1.19? @phschiele what do you think?

bodono commented 11 months ago

Yes that was what I was thinking, if possible on your end.

enzbus commented 11 months ago

I think we need to use oldest-supported-numpy somewhere (probably simply on pyproject.toml). I'm running in the same issue (not with scs, but with some other dependency) for testing on 3.8.

phschiele commented 11 months ago

Using oldest-supported-numpy here seems appropriate. We're doing basically the same thing here: https://github.com/cvxpy/cvxpy/blob/b86d9af05f160a68480f31ec15f169957e55d956/pyproject.toml#L22-L30

Happy to test things on CVXPY side if you can produce a wheel with those changes included.

enzbus commented 11 months ago

@phschiele You can try the cvxpy CI by replacing https://github.com/cvxpy/cvxpy/blob/b86d9af05f160a68480f31ec15f169957e55d956/pyproject.toml#L50C5-L50C18 with 'scs @ git+https://github.com/bodono/scs-python.git' in a test branch, according to this it's the right syntax. Also probably those clauses you mention can be simplified by using oldest-supported-numpy, it's basically what they say in the README.

enzbus commented 11 months ago

This looks fixed with the changes we made, should all be good with next pypi release. (See https://github.com/cvxpy/cvxpy/pull/2291 .)

bodono commented 11 months ago

I can create a 3.2.4.post1 release, I think I can do that still using github actions. Is this ready to be created or are there still issues?

enzbus commented 11 months ago

I think we're good; this seems fixed and the other two PRs you merged (nix and netlib lapack) as well.

SteveDiamond commented 11 months ago

Agreed, looks ready to release.

bodono commented 11 months ago

Ok great, I will try and figure out how to do that now!

bodono commented 11 months ago

I managed to get post1 wheels uploaded (https://pypi.org/project/scs/3.2.4.post1/#files). Let me know if that fixes the issue.