GithubHelp home page GithubHelp logo

Comments (6)

WPettersson avatar WPettersson commented on August 21, 2024 1

Aah, I think I see. Yes, what you suggested works. I guess it may be best for me to wait until there is a semi-stable version of highspy before I delve further into using callbacks via PuLP.

Thanks :)

from highs.

jajhall avatar jajhall commented on August 21, 2024

I've tested

python call_highs_from_python.py

this (on Linux) and it runs fine

from highs.

WPettersson avatar WPettersson commented on August 21, 2024

Can I ask what version of Python highspy you are testing this with? I just tried again on a different machine, and still get the initial ModuleNotFoundError: No module named 'highspy.cb' error. I get this using Python 3.11, and with either highspy==1.7.1.dev1 or highspy==1.5.3.

Is it possible that this is happening because I'm installing highspy from pypi? Do I need to run call_highs_from_python.py from a repository where I have built both highs and highspy from scratch?

from highs.

galabovaa avatar galabovaa commented on August 21, 2024

Let me test these on my linux as well. highspy.cb is the callback module, which we have yet to test more extensively.

from highs.

galabovaa avatar galabovaa commented on August 21, 2024

I tested this locally and, with the example code from our latest branch and highspy from pypi, I get a different error. It is best to use the examples/ code corresponding to the highspy version you are using.

If you want to install highspy from source, it is not necessary to install highs with cmake beforehand. It is enough to call pip install . from the HiGHS/ directory, and this would build highs and the bindings, wrapped up in the highspy package.

For call_highs_from_python.py, this example loads a file from the check/ subdir and it should be run from the root dir.

Would you please check if the following steps would work? I tested this on my linux and it resolved the issue.

python -m pip uninstall highspy
Check out our latest code from the latest branch on GitHub

And then, from the root directory, call

python -m pip install .
python examples/call_highs_from_python.py

from highs.

galabovaa avatar galabovaa commented on August 21, 2024

Yes, we are planing to include callbacks in the upcoming release of HiGHS, once we have tested a bit more and with documentation. Closing this for now, until further issues are encountered.

from highs.

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.