Reputation: 33
For my current project i needed a solver. My selection fell on IPOPT.
When trying to install IPOPT for Python using Anaconda i stumbled upon multiple problems.
For example:
conda install ipopt
installed the ipopt package formally but trying to import it afterwards in Python didn't work.
import ipopt
failed with:
No module named "ipopt".
Reading the docs of ipopt, cyipopt and pyipopt didn't bring any clarification.
System:
Windows 10 64bit, Anaconda 1.9.7, Python 3.7.5 (64bit)
Upvotes: 1
Views: 5366
Reputation: 135
For anyone coming to this after the answer from @johannes, the pycalphad Anaconda channel is no longer maintaining ipopt
/cyipopt
builds for Windows. Since early 2021, ipopt
and cyipopt
[2] are now being distributed by the conda-forge
channel.
They can be installed using Anaconda by:
conda install -c conda-forge ipopt cyipopt
Upvotes: 2
Reputation: 33
This is what fixed the problem for me and allowed for a clean ipopt installation in a seperate environment:
conda create -y -n ipopt_env
conda activate ipopt_env
conda install -y -c pycalphad cyipopt
This should install ipopt into your current environment:
conda install -y -c pycalphad cyipopt
testing:
python -c “import ipopt”
should not return anything.
Execute the following in python for access to the documentation:
import ipopt
help(ipopt)
help(ipopt.problem)
help(ipopt.minimize_ipopt)
Upvotes: 1