Strange behaviour of subprocess.run when using python-mip and CBC binary #292
Unanswered
IlyaShaternik
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone.
I've encountered strange behavior which I'm not sure how to deal with. So I'm using python-mip library to generate .mps files. I solve those .mps files using different solvers. I have some modification of Coin-or-CBC which I compiled and intended to use in my python code with
subprocess.run
like so:The problem is if I create python-mip
mip.Model
object anywhere in my code before callingsubprocess.run
, the call tosubprocess.run
fails without any error message.So this fails:
while this works:
I've tried to call some other unrelated .exe files and they work without any problem. So I created the following simple executable:
And if I call it with
subprocess.run
after creatingmip.Model
object, it fails.Edit:
For building my CBC related executables I don't use CBC that comes with python-mip. I compile static libraries from source.
Beta Was this translation helpful? Give feedback.
All reactions