Skip to content
New issue

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

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

Already on GitHub? # to your account

PyScipOpt references old Scip version. Problem at import of pyscipopt #944

Open
windgaetter opened this issue Jan 14, 2025 · 14 comments
Open

Comments

@windgaetter
Copy link

Describe the bug
Since the last Scip update, PyScipOpt references the wrong libscip version. This results in an error when importing pyscipopt. Currently conda automatically installs Scip 9.2 and PyScipOpt 5.2.1

To Reproduce
Create conda environment and install pyscipopt from conda-forge. Try loading pyscipopt

Expected behavior
I would have expected, that the version is automatically updated or the referencing scip version fixed.

Screenshots

import pyscipopt
Traceback (most recent call last):
File "", line 1, in
File "/home/wind_lu/.conda/envs/test_env/lib/python3.12/site-packages/pyscipopt/init.py", line 11, in
from pyscipopt.scip import Model
ImportError: libscip.so.9.1: cannot open shared object file: No such file or directory

System

  • OS: Ubuntu
  • 22.04
  • Scip 9.2
  • conda-forge

Additional context

@Joao-Dionisio
Copy link
Collaborator

Hey @windgaetter, thanks for letting us know. In the meantime, can you try pip install pyscipopt and see if this works?

@windgaetter
Copy link
Author

That works for me. No error when I try to import it.

We use PyScipOpt in one of our conda packages. So,when you have that fix ready, we will be happy to use it again !

@windgaetter
Copy link
Author

Hi. I was wondering if there are any news when there will be a new conda-forge version of pyscipopt, that could fix this issue here ?

@Joao-Dionisio
Copy link
Collaborator

Hey @windgaetter, sorry for keeping you hanging. We suspect this is because we haven't released in a while. We're working on a new release, which should come out in the coming days

@Joao-Dionisio
Copy link
Collaborator

Hey @windgaetter! We just released. Can you please let us know if your problem was fixed?

@windgaetter
Copy link
Author

windgaetter commented Feb 10, 2025

@Joao-Dionisio Thanks for the new update. We can update to that new version, but run into the following: We run into the warning

UserWarning: linked SCIP 9.02 is not recommended for this version of PySCIPOpt - use version 9.2.1

when loading the Model class.

Interestingly, in our conda environment, PyScipOpt is installed in conjuction with Scip 9.2.1. So the warning pops up a bit unexpected. We have this issue in both our remote pipelines as well as locally.

Also

import pyscipopt
m = pyscipopt.Model()
m.version()

outputs version 9.0.2 instead of 9.2.1 .

@Joao-Dionisio
Copy link
Collaborator

Thank you, @windgaetter, glad to hear that it's at least running now. This warning also showed up for other people (#951), maybe it's a problem with the linking we're doing. We'll look into it this week.

@Joao-Dionisio
Copy link
Collaborator

@windgaetter, can you check whether the current master version is working as expected?

@TheZwieback
Copy link

We have the same issue a warning when using the package from PyPI version PySCIPOpt-5.3.0
UserWarning: linked SCIP 9.02 is not recommended for this version of PySCIPOpt - use version 9.2.1

@Joao-Dionisio
Copy link
Collaborator

@TheZwieback, can you please check whether the behavior persists with the current master?

We still haven't released the version with the fix, but it shouldn't take long.

Meanwhile, if you don't mind me asking: When you say "We", are you part of a company or a research group? We're always very happy to see our software being used :)

@TheZwieback
Copy link

Hi @Joao-Dionisio
we can wait for the fixed version, our tests are working currently so no rush.
We are a company using several open and commercial solvers for optimization problems.

@windgaetter
Copy link
Author

@windgaetter, can you check whether the current master version is working as expected?

@Joao-Dionisio Thanks for the update. Locally it seems to work now without warnings. The master branch version worked. But remotely it still links the wrong SCIP version. I guess the fixed version is not yet published to conda ?

@Joao-Dionisio
Copy link
Collaborator

@windgaetter yes, that's right, we need to do another release. Either the end of this week, or the next one, I'm guessing.

@Joao-Dionisio
Copy link
Collaborator

Joao-Dionisio commented Feb 25, 2025

@windgaetter, @TheZwieback we just released today. Would you mind checking if it's working now with the newest release?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants