mechmotum / cyipopt

Cython interface for the interior point optimzer IPOPT
Eclipse Public License 2.0
227 stars 54 forks source link

Missing cyipopt executable with conda osx-arm64 #245

Closed adowling2 closed 6 months ago

adowling2 commented 6 months ago

I installed cyipopt with conda install -c conda-forge cyipopt.

Unfortunately, I am getting the error cyipopt is not available when calling the solver from Pyomo.

Looking in the folder /Users/adowling/opt/anaconda3/envs/measurement_optimization/bin, I see executables ipopt and ipopt_sens but not cyipopt.

Here is the output for conda list:

# packages in environment at /Users/adowling/opt/anaconda3/envs/measurement_optimization:
#
# Name                    Version                   Build  Channel
ampl-mp                   3.1.0             h21a7fc1_1005  
anyio                     4.2.0           py310hca03da5_0  
appnope                   0.1.2           py310hca03da5_1001  
argon2-cffi               21.3.0             pyhd3eb1b0_0  
argon2-cffi-bindings      21.2.0          py310h1a28f6b_0  
asttokens                 2.0.5              pyhd3eb1b0_0  
async-lru                 2.0.4           py310hca03da5_0  
attrs                     23.1.0          py310hca03da5_0  
babel                     2.11.0          py310hca03da5_0  
beautifulsoup4            4.12.2          py310hca03da5_0  
blas                      1.0                    openblas  
bleach                    4.1.0              pyhd3eb1b0_0  
bottleneck                1.3.7           py310hbda83bc_0  
brotli                    1.0.9                h1a28f6b_7  
brotli-bin                1.0.9                h1a28f6b_7  
brotli-python             1.0.9           py310hc377ac9_7  
bzip2                     1.0.8                h80987f9_5  
ca-certificates           2024.2.2             hf0a4a13_0    conda-forge
certifi                   2024.2.2        py310hca03da5_0  
cffi                      1.16.0          py310h80987f9_0  
charset-normalizer        2.0.4              pyhd3eb1b0_0  
comm                      0.1.2           py310hca03da5_0  
contourpy                 1.2.0           py310h48ca7d4_0  
cycler                    0.11.0             pyhd3eb1b0_0  
cyipopt                   1.3.0           py310h3f0b458_3    conda-forge
cyrus-sasl                2.1.28               h9131b1a_1  
debugpy                   1.6.7           py310h313beb8_0  
decorator                 5.1.1              pyhd3eb1b0_0  
defusedxml                0.7.1              pyhd3eb1b0_0  
exceptiongroup            1.2.0           py310hca03da5_0  
executing                 0.8.3              pyhd3eb1b0_0  
fonttools                 4.25.0             pyhd3eb1b0_0  
freetype                  2.12.1               h1192e45_0  
gettext                   0.21.0               h13f89a0_1  
glib                      2.78.4               h313beb8_0  
glib-tools                2.78.4               h313beb8_0  
gst-plugins-base          1.14.1               h313beb8_1  
gstreamer                 1.14.1               h80987f9_1  
gurobi                    11.0.0                  py310_0    gurobi
icu                       73.1                 h313beb8_0  
idna                      3.4             py310hca03da5_0  
ipopt                     3.14.14              h6639f4a_1    conda-forge
ipykernel                 6.28.0          py310hca03da5_0  
ipython                   8.20.0          py310hca03da5_0  
ipywidgets                8.0.4           py310hca03da5_0  
jedi                      0.18.1          py310hca03da5_1  
jinja2                    3.1.3           py310hca03da5_0  
jpeg                      9e                   h80987f9_1  
json5                     0.9.6              pyhd3eb1b0_0  
jsonschema                4.19.2          py310hca03da5_0  
jsonschema-specifications 2023.7.1        py310hca03da5_0  
jupyter                   1.0.0           py310hca03da5_9  
jupyter-lsp               2.2.0           py310hca03da5_0  
jupyter_client            8.6.0           py310hca03da5_0  
jupyter_console           6.6.3           py310hca03da5_0  
jupyter_core              5.5.0           py310hca03da5_0  
jupyter_events            0.8.0           py310hca03da5_0  
jupyter_server            2.10.0          py310hca03da5_0  
jupyter_server_terminals  0.4.4           py310hca03da5_1  
jupyterlab                4.0.11          py310hca03da5_0  
jupyterlab_pygments       0.1.2                      py_0  
jupyterlab_server         2.25.1          py310hca03da5_0  
jupyterlab_widgets        3.0.9           py310hca03da5_0  
kiwisolver                1.4.4           py310h313beb8_0  
krb5                      1.20.1               hf3e1bf2_1  
lcms2                     2.12                 hba8e193_0  
lerc                      3.0                  hc377ac9_0  
libblas                   3.9.0           16_osxarm64_openblas    conda-forge
libbrotlicommon           1.0.9                h1a28f6b_7  
libbrotlidec              1.0.9                h1a28f6b_7  
libbrotlienc              1.0.9                h1a28f6b_7  
libclang                  14.0.6          default_h1b80db6_1  
libclang13                14.0.6          default_h24352ff_1  
libcxx                    16.0.6               h4653b0c_0    conda-forge
libdeflate                1.17                 h80987f9_1  
libedit                   3.1.20230828         h80987f9_0  
libffi                    3.4.4                hca03da5_0  
libgfortran               5.0.0           13_2_0_hd922786_3    conda-forge
libgfortran5              13.2.0               hf226fd6_3    conda-forge
libglib                   2.78.4               h0a96307_0  
libiconv                  1.16                 h1a28f6b_2  
liblapack                 3.9.0           16_osxarm64_openblas    conda-forge
libllvm14                 14.0.6               h7ec7a93_3  
libopenblas               0.3.21               h269037a_0  
libpng                    1.6.39               h80987f9_0  
libpq                     12.17                h02f6b3c_0  
libscotch                 7.0.4                hc938e73_1    conda-forge
libsodium                 1.0.18               h1a28f6b_0  
libsqlite                 3.45.1               h091b4b1_0    conda-forge
libtiff                   4.5.1                h313beb8_0  
libwebp-base              1.3.2                h80987f9_0  
libxml2                   2.10.4               h0dcf63f_1  
libzlib                   1.2.13               h53f4e23_5    conda-forge
llvm-openmp               14.0.6               hc6e5704_0  
lz4-c                     1.9.4                h313beb8_0  
markupsafe                2.1.3           py310h80987f9_0  
matplotlib                3.8.0           py310hca03da5_0  
matplotlib-base           3.8.0           py310h46d7db6_0  
matplotlib-inline         0.1.6           py310hca03da5_0  
metis                     5.1.0             h13dd4ca_1007    conda-forge
mistune                   2.0.4           py310hca03da5_0  
mumps-include             5.6.2                hce30654_4    conda-forge
mumps-seq                 5.6.2                hbbab245_4    conda-forge
munkres                   1.1.4                      py_0  
mysql                     5.7.24               ha71a6ea_2  
nbclient                  0.8.0           py310hca03da5_0  
nbconvert                 7.10.0          py310hca03da5_0  
nbformat                  5.9.2           py310hca03da5_0  
ncurses                   6.4                  h313beb8_0  
nest-asyncio              1.6.0           py310hca03da5_0  
notebook                  7.0.8           py310hca03da5_0  
notebook-shim             0.2.3           py310hca03da5_0  
numexpr                   2.8.7           py310hecc3335_0  
numpy                     1.26.4          py310h3b2db8e_0  
numpy-base                1.26.4          py310ha9811e2_0  
openjpeg                  2.3.0                h7a6adac_2  
openssl                   3.2.1                h0d3ecfb_0    conda-forge
overrides                 7.4.0           py310hca03da5_0  
packaging                 23.1            py310hca03da5_0  
pandas                    2.1.4           py310h46d7db6_0  
pandocfilters             1.5.0              pyhd3eb1b0_0  
parso                     0.8.3              pyhd3eb1b0_0  
pcre2                     10.42                hb066dcc_0  
pexpect                   4.8.0              pyhd3eb1b0_3  
pillow                    10.2.0          py310h80987f9_0  
pip                       23.3.1          py310hca03da5_0  
platformdirs              3.10.0          py310hca03da5_0  
ply                       3.11                     pypi_0    pypi
prometheus_client         0.14.1          py310hca03da5_0  
prompt-toolkit            3.0.43          py310hca03da5_0  
prompt_toolkit            3.0.43               hd3eb1b0_0  
psutil                    5.9.0           py310h1a28f6b_0  
ptyprocess                0.7.0              pyhd3eb1b0_2  
pure_eval                 0.2.2              pyhd3eb1b0_0  
pycparser                 2.21               pyhd3eb1b0_0  
pygments                  2.15.1          py310hca03da5_1  
pyomo                     6.7.1.dev0               pypi_0    pypi
pyparsing                 3.0.9           py310hca03da5_0  
pyqt                      5.15.10         py310h313beb8_0  
pyqt5-sip                 12.13.0         py310h80987f9_0  
pysocks                   1.7.1           py310hca03da5_0  
python                    3.10.13         h2469fbe_1_cpython    conda-forge
python-dateutil           2.8.2              pyhd3eb1b0_0  
python-fastjsonschema     2.16.2          py310hca03da5_0  
python-json-logger        2.0.7           py310hca03da5_0  
python-tzdata             2023.3             pyhd3eb1b0_0  
python_abi                3.10                    4_cp310    conda-forge
pytz                      2023.3.post1    py310hca03da5_0  
pyyaml                    6.0.1           py310h80987f9_0  
pyzmq                     25.1.2          py310h313beb8_0  
qt-main                   5.15.2              h0917680_10  
qtconsole                 5.5.0           py310hca03da5_0  
qtpy                      2.4.1           py310hca03da5_0  
readline                  8.2                  h1a28f6b_0  
referencing               0.30.2          py310hca03da5_0  
requests                  2.31.0          py310hca03da5_1  
rfc3339-validator         0.1.4           py310hca03da5_0  
rfc3986-validator         0.1.1           py310hca03da5_0  
rpds-py                   0.10.6          py310hf0e4da2_0  
scipy                     1.11.4          py310h20cbe94_0  
scotch                    7.0.4                heaa5b5c_1    conda-forge
send2trash                1.8.2           py310hca03da5_0  
setuptools                68.2.2          py310hca03da5_0  
sip                       6.7.12          py310h313beb8_0  
six                       1.16.0             pyhd3eb1b0_1  
sniffio                   1.3.0           py310hca03da5_0  
soupsieve                 2.5             py310hca03da5_0  
sqlite                    3.41.2               h80987f9_0  
stack_data                0.2.0              pyhd3eb1b0_0  
terminado                 0.17.1          py310hca03da5_0  
tinycss2                  1.2.1           py310hca03da5_0  
tk                        8.6.13               h5083fa2_1    conda-forge
tomli                     2.0.1           py310hca03da5_0  
tornado                   6.3.3           py310h80987f9_0  
traitlets                 5.7.1           py310hca03da5_0  
typing-extensions         4.9.0           py310hca03da5_1  
typing_extensions         4.9.0           py310hca03da5_1  
tzdata                    2024a                h04d1e81_0  
urllib3                   2.1.0           py310hca03da5_1  
wcwidth                   0.2.5              pyhd3eb1b0_0  
webencodings              0.5.1           py310hca03da5_1  
websocket-client          0.58.0          py310hca03da5_4  
wheel                     0.41.2          py310hca03da5_0  
widgetsnbextension        4.0.5           py310hca03da5_0  
xz                        5.4.6                h80987f9_0  
yaml                      0.2.5                h1a28f6b_0  
zeromq                    4.3.5                h313beb8_0  
zlib                      1.2.13               h53f4e23_5    conda-forge
zstd                      1.5.5                hd90d995_0  
moorepants commented 6 months ago

There is no cyipopt exectuable because the package does not have one. It is only a python package and importable in python. I don't know anything about how pyomo uses cyipopt. Did you try running cyipopt's examples?

Also, it seems you are mixing conda forge packages with packages from other channels. Conda forge recommends against that practice due to high chance for incompatibilities.

adowling2 commented 6 months ago

@moorepants Thank you for the quick response and suggestion. I'm working with the examples now and getting an issue with mumps not being able to find liblapack despite it being installed via conda. I'll update here once I get it working and then likely close this issue. Thank you for your service to the community!

moorepants commented 6 months ago

My recommendation would be to try a conda-forge only env:

conda create -n cyipopt -c conda-forge cyipopt
conda activate cyipopt
python hs071.py

If you mix conda forge and default channel packages, I've seen it break cyipopt before. You can get a mismatched lapack for example.

adowling2 commented 6 months ago

@moorepants I was able to get the example working with your suggestion.

moorepants commented 6 months ago

Great, I'll close this.