Giter Club home page Giter Club logo

Comments (4)

Viech avatar Viech commented on June 1, 2024 1

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:

  1. 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 only swiglpk from pip), they are for that moment correct.
  2. 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.
  3. Now either (a) setup.py does not find GLPK installed to link swiglpk against (this issue) or (b) GLPK is installed but setup.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.

cdiener avatar cdiener commented on June 1, 2024 1

Okay, this time it's really fixed. Wheels for 3.10 are now provided for swiglpk 5.0.4.

from swiglpk.

cdiener avatar cdiener commented on June 1, 2024

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.

Midnighter avatar Midnighter commented on June 1, 2024

Great, thank you @cdiener !

from swiglpk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.