Advanced Installation
ParMOO can be installed with pip
or directly from its GitHub source.
ParMOO’s base has the following dependencies, which may be automatically installed depending on your choice of method:
Additional dependencies are needed to use the additional features in
parmoo.extras
:
libEnsemble – for managing parallel simulation evaluations
And for using the Pareto front visualization library in parmoo.viz
:
If you want to run the tests (in parmoo.tests
), then you will also need:
pytest-cov, and
pip
The easiest way to install is via the PyPI package manager (pip
utility).
To install the latest release:
pip install < --user > parmoo
where the braces around < --user >
indicate that the --user
flag is
optional.
Note that the default install will not install the extra dependencies, such as libEnsemble.
To install all dependencies, use:
pip install < --user > parmoo[extras]
To check the installation by running the full test suite, use:
python3 setup.py test
which will also install the test dependencies (pytest, pytest-cov, and flake8).
Conda Forge
For some users (in particular, this is the recommended method for Windows
users), the preferred method for obtaining the latest release of
ParMOO may be through the conda
package manager.
The latest release of ParMOO is available through the conda-forge
channel.
Note that conda
does not support optional dependencies, so the following
command will automatically fetch all required and optional dependencies:
conda install --channel=conda-forge parmoo
Before running the above command, it is recommended to create a new conda environment to avoid conflicts. Do so using:
conda create --name channel-name
conda activate channel-name
After performing a conda-forge
installation of ParMOO, you can run
our unit tests to make sure your installation is working:
py.test --pyargs parmoo.tests.unit_tests
Install from GitHub source
You may want to install ParMOO from its GitHub source code, so that you can easily pull the latest updates.
The easiest way to do this is to clone it from our GitHub and then
pip
install it in-place by using the -e .
option.
In a bash shell, that looks like this.
git clone https://github.com/parmoo/parmoo
cd parmoo
pip install -e .
This command will use the setup.py
file to generate an egg
inside
the parmoo
base directory.
Alternatively, you could just add the parmoo
base directory to your
PYTHONPATH
environment variable. In the bash shell, this looks like:
git clone https://github.com/parmoo/parmoo
cd parmoo
export PYTHONPATH=$PYTHONPATH:`pwd`
However, this technique will not install any of ParMOO’s dependencies.
Additionally, if you would like to use libEnsemble to handle parallel
function evaluations (from extras.libe
),
you will need to also install libEnsemble.
To install libEnsemble with PyPI, use
pip3 install libensemble
or visit the libEnsemble_documentation for detailed installation instructions.
After installation, you can run the tests using either:
python3 setup.py test
(if you used the pip install -e .
method), or:
parmoo/tests/run-tests.sh -cu<rl>