Comments (4)
After hitting this problem quite a few times in different contexts, I want to note that this issue and closely related ones will be re-experienced by your users with every release of a new Python major version.
Here is what happens every time, as far as I understand it:
- Users install swiglpk, thinking this gives them everything they need. Since normally there is a wheel and that wheel appears to include GLPK (as e.g. the
Python:3.9
docker image lets you solve problems after installing onlyswiglpk
from pip), they are for that moment correct. - A new Python major version is released. There are no wheels for this version yet and there won't be any for a couple more days to months. pip sees that there are no wheels and downloads the source instead. It executes
setup.py
. - Now either (a)
setup.py
does not find GLPK installed to link swiglpk against (this issue) or (b) GLPK is installed butsetup.py
fails to locate it as the location code is not platform-independent (#40) or (c) the user has GLPK but not SWIG or some other build-time dependency installed (#36).
I don't know a good long-term solution but I suggest to at least make the error messages produced by setup.py
really explain the situation, like I tried above. This would give users running swiglpk as part of a CI/CD pipeline a heads-up warning that it will break again when they bump the Python version another time, and it would allow them to work around the issue by making sure every dependency necessary for a source build is installed (and by patching setup.py
to find it, if necessary).
from swiglpk.
Okay, this time it's really fixed. Wheels for 3.10 are now provided for swiglpk 5.0.4.
from swiglpk.
I sent in a PR to support 3.10.
@Viech this is more an issue of a lack of contributors more than anything else. We have very few contributors across the COBRA ecosystem at the moment and new Python versions will always require at least a minimal amount of adjustments. We definitely welcome PRs to fix those issues though :)
Additional work-around is to use conda with a supported Python version or setting the GLPK_HEADER_PATH
environment variable. swiglpk and optlang are on conda-forge and have a few more contributors.
from swiglpk.
Great, thank you @cdiener !
from swiglpk.
Related Issues (20)
- swiglpk wheels should probably be compiled with GMP support (at least for OS X and Linux) HOT 2
- Set up automatic swiglpk releases that follow the GLPK version numbers HOT 2
- Create benchmarks for swiglpk and decide on a C interface
- memory allocated with `as_intArray` and `as_doubleArray` is never freed HOT 8
- Create wheels for python 3.7 HOT 2
- Mac support trouble
- pip install fails with Python 3.8.0 HOT 3
- pip install fails with Python 3.9.0 HOT 4
- setup.py fails to locate an existing glpk.h in /usr/include. HOT 3
- Support GLPK 5.0. HOT 4
- Update CI/CD and create a release that supports Python 3.9+ HOT 4
- Remove Python 2 support
- Is possible build CBC from pure python? HOT 1
- Drop i686? HOT 1
- Potential vulnerability in the C library which swiglpk depends on. Can you help upgrade to patch versions? HOT 1
- Missing SDist for 5.0.x release (x!=0) HOT 2
- Can't install swiglpk/cobrapy in Docker image HOT 4
- Should we limit builds to maintained Python versions only? HOT 1
- python3.12.0 compatibility HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiglpk.