Open nikhil550 opened 4 months ago
Hello @nikhil550 ! Thanks for notifying. That is weird as generally CI passes, it may be really OS-specific. You may try to drop the dependency in the env/environment file, just to create the environment. Then you may install ipopt in mac using an alternative approach. That should work.
It is worth keeping this issue open so that we track the problem and later revise the environment as the #494 issue is solved, which enables to upgrade pypsa and support the solving capabilities using linopy.
I faced the same issue. Removing the constraint on ipopt in the environment.yml
file should solve the issue.
I was able to install by removing removing Ipopt and installing locally per the recommendation above.
This occurs because envs/environment.yaml
requires ipopt <3.13.3
but the first version available for Apple silicon (arm/M1 or later) is 3.14.5. You can see this by running the following commands:
# search for macOS arm architecture
CONDA_SUBDIR=osx-arm64 conda search ipopt
# search for macOS x86 architecture
CONDA_SUBDIR=osx-64 conda search ipopt
It is possible to work around this by running CONDA_SUBDIR=osx-64 mamba env create -f envs/environment.yaml
, which will create an x86 environment. But pypsa-earth will then in emulation mode, which reduces performance. Or users can change the ipopt version dependency in envs/environment.yaml
, with unknown side effects.
Would it be possible to update pypsa-earth to work with ipopt 3.14.5 or later?
Thanks for sharing your experience @mfripp!
As discussed above, that is a system-dependent issue a clean solution for which requires introducing consecutive fixes into the environment. For the newer Mac OS versions, removing the version constraint for ipopt
is known to work fine (although, for other OS the constraint may be still needed).
Hi all,
Current situation
In the environment.yaml file we enforce ipopt<3.13.3
. This works fine for CI-windows and CI-linux. However it does not work for CI-mac, because there are no available versions of ipopt<3.13.3 on Mac.
Experiment
I tried to remove ipopt<3.13.3. In this case, CI-linux and CI-Mac work fine, however CI-windows fails with the following error
WARNING:__main__:The configured solver
glpkdoes not support quadratic objectives. Falling back to
ipopt. WARNING:pyomo.solvers:Could not locate the 'ipopt' executable, which is required for solver ipopt ERROR:_helpers:An error happened in module 'C:\\Users\\runneradmin\\miniconda3\\envs\\pypsa-earth\\lib\\site-packages\\pyomo\\opt\\solver\\shellcmd.py', function 'available': No executable found for solver 'ipopt'
.
After a bit of reading I found an explanation at this link.
Checklist
main
branch or the latest release. Please indicate.pypsa-earth
environment. Update viaconda env update -f envs/environment.yaml
.Describe the Bug
Installing pypsa earth on Mac M1, mamba was unable to install Ipopt dependecy.
Error Message
mamba env create -f envs/environment.yaml
yielded the following error:with conda env update: