Last active
May 28, 2019 15:38
-
-
Save jckantor/1ab449b51159b80a84b52d7a3de0f98d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, shutil | |
if 'google.colab' in sys.modules: | |
!pip install -q pyomo | |
!wget -N -q "https://ampl.com/dl/open/ipopt/ipopt-linux64.zip" | |
!unzip -o -q ipopt-linux64 | |
ipopt_executable = '/content/ipopt' | |
else: | |
ipopt_executable = shutil.which('ipopt') | |
if ipopt_executable is None: | |
raise FileNotFoundError('Could not locate the ipopt executable.') | |
print('Using the ipopt executable located at:', ipopt_executable) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment