Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build/install tools + the release of numpy==1.20 broke installing cvxpy on Linux and in Docker #1040

Closed
1fish2 opened this issue Feb 12, 2021 · 3 comments
Assignees
Labels

Comments

@1fish2
Copy link
Contributor

1fish2 commented Feb 12, 2021

See pypa/pip#9542

  • Our Docker builds are broken.
  • Our current virtualenvs on Sherlock and other Linux machines are OK with their previously-installed cvxpy, but installing cvxpy now would break them.
  • Test by running python -c "import cvxpy". It should not throw a RuntimeError or an ImportError.

See https://github.com/cvxgrp/cvxpy/issues/1229
See pypa/pip#9542

Workaround 1: Update to cvxpy==1.1.10 which uses a pyproject.toml feature called "oldest-supported-numpy" to workaround this problem (for how long?).
I'll do this soon and have updated virtualenv wcEcoli3-staging on Sherlock.

Workaround 2: Update the wcEcoli project to numpy=1.20.1 and reinstall cvxpy. This will work until the next numpy binary incompatibility. I'm planning to test numpy=1.20 soon but it has deprecations to deal with, maybe API changes to deal with, and lots of code cleanup (removing Python 2.7 relics) which suggests lots of testing.

@1fish2 1fish2 added the bug label Feb 12, 2021
@1fish2 1fish2 self-assigned this Feb 12, 2021
1fish2 added a commit that referenced this issue Feb 12, 2021
@1fish2
Copy link
Contributor Author

1fish2 commented Feb 12, 2021

Workaround 3: install cvxpy with the --no-build-isolation switch.

Workaround 1 seems to work for the master branch.
Workaround 3 might work for the Python 2 release snapshot.

@1fish2
Copy link
Contributor Author

1fish2 commented Feb 13, 2021

The wcm-runtime Docker Image in WholeCellEcoliRelease still builds and loads cvxpy!

Building that Python 2.7 environment on Sherlock failed to compile qdldl: error: ‘for’ loop initial declarations are only allowed in C99 mode. Maybe it needs different modules to get a suitable compiler.

1fish2 added a commit that referenced this issue Feb 17, 2021
When building a `wcm-runtime` Docker Image, make the default be to install numpy & scipy from wheels with their embedded copies of OpenBLAS.

It's **much faster** and it's the usual approach so we're less likely to hit installer bugs like #1040.

The reason for compiling OpenBLAS from source was originally to get a bug fix and later to avoid the AVX2 problem building it in Docker-for-Mac.

This does change Parca outputs but that's all part of #931.
1fish2 added a commit that referenced this issue Feb 19, 2021
…and in Docker (#1045)

* get the workaround in cvxpy==1.1.10 for #1040
* Docker: optionally install OpenBLAS, numpy, & scipy from source
* diff_simouts: ignore `shell.log` files; just compare tables, each of which is a subdir
@1fish2
Copy link
Contributor Author

1fish2 commented Jun 9, 2021

Fixed by #1045.

@1fish2 1fish2 closed this as completed Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant