Getting Started¶
Installation¶
To install the IDAES PSE framework, follow the set of instructions below that are appropriate for your needs and operating system. If you get stuck, please contact idaes-support@idaes.org.
After installing and testing IDAES, it is strongly recommended to do the IDAES tutorials located on the examples online documentation page.
If you expect to develop custom models, we recommend following the advanced user installation.
The OS specific instructions provide information about optionally installing Miniconda. If you already have a Python installation you prefer, you can skip the Miniconda install section.
Note
IDAES supports Python 3.6 and above.
System |
Section |
---|---|
Linux |
|
Windows |
|
Mac OSX |
|
Generic |
Warning
If you are using Python for other complex projects, you may want to consider using environments of some sort to avoid conflicting dependencies. There are several good options including conda environments if you use Anaconda.
Windows¶
Install Miniconda (optional)
Download: https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
Install anaconda from the downloaded file in (1).
Open the Anaconda Prompt (Start -> “Anaconda Prompt”).
In the Anaconda Prompt, follow the Generic Install instructions.
Linux¶
Install Miniconda (optional)
Download: https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
Open a terminal window
Run the script you downloaded in (1).
Install Dependencies
The IPOPT solver depends on the GNU FORTRAN, GOMP, Blas, and Lapack libraries, If these libraries are not already installed on your Linux system, you or your system administrator can use the sample commands below to install them. If you have a Linux distribution that is not listed, IPOPT should still work, but the commands to install the required libraries may differ. If these libraries are already installed, you can skip this and proceed with the next step.
Note
Depending on your distribution, you may need to prepend
sudo
to these commands or switch to the “root” user.apt-get (Current Ubuntu based distributions):
sudo apt-get install libgfortran4 libgomp1 liblapack3 libblas3
yum (Current RedHat based distributions, including CentOS):
yum install lapack blas libgfortran libgomp
Complete Generic Install
Follow the Generic Install instructions.
Mac/OSX¶
Install Miniconda (optional)
Download: https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
For the next steps, open a terminal window
Run the script you downloaded in (1).
Complete Generic Install
Follow the Generic Install instructions.
Generic Install¶
The remaining steps performed in either the Linux or OSX Terminal or Powershell. If you installed Miniconda on Windows use the Anaconda Prompt or Anaconda Powershell Prompt. Regardless of OS and shell, the following steps are the same.
Install IDAES
Install IDAES with pip by one of the following methods
To get the latest release:
pip install idaes-pseTo get a specific release, for example 1.7:
pip install idaes-pse==1.7To get the latest development main branch:
pip install git+https://github.com/idaes/idaes-pseTo get a specific fork or branch, for example myfork (of idaes-pse) and mybranch:
pip install git+https://github.com/myfork/idaes-pse@mybranch
Run the idaes get-extensions command to install the compiled binaries:
idaes get-extensions
Warning
The IDAES binary extensions are not yet supported on Mac/OSX.
As a fallback (assuming you are using a conda env) you can install the generic ipopt solver with the command
conda install -c conda-forge ipopt
though this will not have all the features of our extensions package.
Run the idaes get-examples command to download and install the example files:
idaes get-examples
By default this will install in a folder “examples” in the current directory. The command has many options, but an important one is –dir, which specifies the folder in which to install.
for Mac and Linux users this would look like:
idaes get-examples --dir ~/idaes/examplesor, for Windows users, it would look like:
idaes get-examples --dir C:\Users\MyName\IDAES\ExamplesRefer to the full idaes get-examples command documentation for more information.
Run tests:
pytest --pyargs idaes -W ignore
You should see the tests run and all should pass to ensure the installation worked. You may see some “Error” level log messages, but they are okay, and produced by tests for error handling. The number of tests that failed and succeeded is reported at the end of the pytest output. You can report problems on the Github issues page (Please try to be specific about the command and the offending output.)
Optional Dependencies¶
Some tools in IDAES may require additional dependencies. Instructions for installing these dependencies are located here.
Updating an existing installation¶
When a new version is released, an IDAES installation can be updated without having to remove and reinstall it from scratch.
The following steps describe how to upgrade an existing installation in-place, assuming that the installation was done using one of the methods described earlier in this section.
Warning
If IDAES was installed in a dedicated environment (e.g. a Conda environment, or Python virtual environment), activate the environment before running any of these commands.
Open a terminal and verify the currently installed version of IDAES:
idaes --version
Install the upgraded version of the
idaes-pse
package usingpip install
:pip install --upgrade idaes-pse
If a newer version of the
idaes-pse
package is available, the currently installed version will be removed and replaced by the newest available version. Check again the IDAES version to verify that the upgrade was successful:idaes --version
Run the
idaes get-extension
command to install compiled binaries compatible with the newly upgraded IDAES version:idaes get-extensions
Finally, use the
idaes get-examples
command to install the most recent version of the IDAES examples compatible with the upgraded IDAES version.Warning
If the examples target installation directory is not empty, its contents, including examples installed with a previous IDAES version and other files, will be overwritten without warning. To avoid losing data, it is strongly recommended that you make a backup copy of any existing examples directory before proceeding.
After creating a backup copy of the existing examples directory, run:
idaes get-examples