Gurobi header files and C++ interface libraries not included in anaconda installation
AnsweredHello,
Our custom python + c++ package links against libgurobi90.so and libgurobi_c++.a, and relies on the ability to find the gurobi header files (gurobi_c.h and gurobi_c++.h). In the past, we have been relying on the user to pre-install gurobi before attempting to compile/install our package, which then gives us access to these libraries to compile against.
We would like to move to a fully-automated install by leveraging Gurobi's anaconda package on the gurobi channel. However, we're finding that by installing gurobi this way, we do have access to libgurobi90.so in the active conda environment, but we're missing the header files (which do not seem to have been included in your build recipe), as well a the c++ static libraries.
Is there a specific reason these components are not included in your conda package?
If these components cannot be included in your conda package for whatever reason, it seems to us that we have 2 options, neither ideal:
- Pull/extract/compile/install your source gurobi package from source in our conda recipe.
- Rewrite our application to use your python interface rather than tapping into your C++ libraries directly.
However, inclusion of the missing pieces in your conda installation would seem to me to be the best option, both for us as well as future users of your library. Note that we leave it to the user to do a valid activation of gurobi license in all cases, of course.
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Vineet,
May I ask what project you are working on that uses Gurobi?
Is there a reason why you don't include the required files directly in your application? This would allow users to get started right away - given they have a valid license.The Anaconda package does not include the header files or other libraries because this is simply not necessary and the sole purpose of the Anaconda package is to make the gurobipy module available for Python users.
Cheers,
Matthias0 -
Thanks Matthias,
Our project is HATCHet (https://github.com/raphael-group/hatchet).We could absolutely include building gurobi from source in our conda recipe - just wanted to make sure I'm not missing an obvious way to get around this problem.
So just to be sure, you're suggesting we do something like the following steps in our conda recipe (we're already doing similar for our CI testing):
wget https://packages.gurobi.com/9.0/gurobi9.0.2_linux64.tar.gz -O gurobi9.0.2_linux64.tar.gz
tar xvzf gurobi9.0.2_linux64.tar.gz
(cd gurobi902/linux64/src/build && make)
(cd gurobi902/linux64/lib && ln -f -s ../src/build/libgurobi_c++.a libgurobi_c++.a)This will have the effect of (indirectly) including the required files for our conda package.
We're increasingly seeing conda packages being used in the BioInformatics community for distribution of pure C++ libraries/headers, so maybe you want to think about making your conda package a full-fledged way of installing Gurobi. That'll be awesome!
0 -
Thanks for the detailed answer, Vineet!
Yes, your approach looks perfectly fine like this. Concerning the conda packages: I forwarded your request to our development team - maybe we can provide more files in our conda package in the future.
Cheers,
Matthias0
Post is closed for comments.
Comments
4 comments