conda-forge / casadi-feedstock

A conda-smithy repository for casadi.
BSD 3-Clause "New" or "Revised" License
8 stars 12 forks source link

conda install will lead to a version without solvers #21

Closed Maik93 closed 1 year ago

Maik93 commented 5 years ago

Hi, I've installed CasADi from conda-forge following your guide. The code test proposed in your quick install works, but when I try to use qpoases I get the error:

Cannot load shared library 'libcasadi_conic_qpoases.so' [...]
<conda_env_name>/lib/python3.7/site-packages/casadi/libcasadi_conic_qpoases.so: cannot open shared object file: No such file or directory.

Looking at that directory I've noticed this:

$ ls <conda_env_name>/lib/python3.7/site-packages/casadi
casadi.py  _casadi.so  __init__.py  __pycache__  tools

while the content of your archive is very different:

$ ls ~/Downloads/casadi-linux-py37-v3.4.5-64bit/casadi
casadi                                       libcasadi_conic_gurobi.so                          libcasadi_importer_clang.so          libcasadi_linsol_lsqr.so        libcasadi_rootfinder_fast_newton.so
casadi.py                                    libcasadi_conic_hpmpc.so                           libcasadi_importer_shell.so          libcasadi_linsol_ma27.so        libcasadi_rootfinder_kinsol.so
_casadi.so                                   libcasadi_conic_nlpsol.so                          libcasadi_integrator_collocation.so  libcasadi_linsol_qr.so          libcasadi_rootfinder_newton.so
cmake                                        libcasadi_conic_qpoases.so                         libcasadi_integrator_cvodes.so       libcasadi_linsol_symbolicqr.so  libcasadi_rootfinder_nlpsol.so
include                                      libcasadi_conic_qrqp.so                            libcasadi_integrator_idas.so         libcasadi_nlpsol_ampl.so        libcasadi.so
__init__.py                                  libcasadi_dple_slicot.so                           libcasadi_integrator_rk.so           libcasadi_nlpsol_blocksqp.so    libcasadi_sundials_common.so
libcasadi_blasfeo_GENERIC.so                 libcasadi_expm_slicot.so                           libcasadi_interpolant_bspline.so     libcasadi_nlpsol_bonmin.so      libcasadi_xmlfile_tinyxml.so
libcasadi_blasfeo_X64_AMD_BULLDOZER.so       libcasadi_hpmpc_C99_4X4_GENERIC.so                 libcasadi_interpolant_linear.so      libcasadi_nlpsol_ipopt.so       libgfortran-ed201abd.so.3.0.0
libcasadi_blasfeo_X64_INTEL_CORE.so          libcasadi_hpmpc_X64_AVX2_X64_INTEL_HASWELL.so      libcasadi_linsol_csparsecholesky.so  libcasadi_nlpsol_knitro.so      __pycache__
libcasadi_blasfeo_X64_INTEL_HASWELL.so       libcasadi_hpmpc_X64_AVX_GENERIC.so                 libcasadi_linsol_csparse.so          libcasadi_nlpsol_scpgen.so      tools
libcasadi_blasfeo_X64_INTEL_SANDY_BRIDGE.so  libcasadi_hpmpc_X64_AVX_X64_INTEL_SANDY_BRIDGE.so  libcasadi_linsol_lapacklu.so         libcasadi_nlpsol_snopt.so
libcasadi_conic_clp.so                       libcasadi_hpmpc_X64_SSE3_X64_AMD_BULLDOZER.so      libcasadi_linsol_lapackqr.so         libcasadi_nlpsol_sqpmethod.so
libcasadi_conic_cplex.so                     libcasadi_hpmpc_X64_SSE3_X64_INTEL_CORE.so         libcasadi_linsol_ldl.so              libcasadi_nlpsol_worhp.so

Replacing the directory installed by pip with your archive solves my problem (qp solver is now found). I'm just here to report that there's something strange in the precompiled version on conda-forge (currently on Python 3.7, CasADi v3.4.5)

traversaro commented 3 years ago

For what regards qpOASES, before enabling support for it in the conda-forge build of CasADi, we need to add it in conda-forge itself, but this is softly blocked (softly as there could be workarounds) by the lack of upstream release in qpOASES, see https://github.com/coin-or/qpOASES/issues/113 .

traversaro commented 1 year ago

qpOASES was added in https://github.com/conda-forge/casadi-feedstock/pull/74, I think we can close the issue.