Installation#

Install using pip#

The standard package installer for Python is pip.

To use PyDPF-Post with Ansys 2021 R1 or later, install the latest version with this command:

pip install ansys-dpf-post

PyDPF-Post plotting capabilities require an installation of PyVista. To install PyDPF-Post with its optional plotting functionalities, use this command:

pip install ansys-dpf-post[plotting]

For more information about PyDPF-Post plotting capabilities, see Plot results.

Install without internet#

If you are unable to install PyDPF-Post on the host machine using pip due to network isolation, you can download the wheelhouse corresponding to your platform and Python interpreter version. To obtain the latest release, go to the Assets section for the latest PyDPF-Post release on GitHub.

The wheelhouse is a ZIP file containing Python wheels for all the packages PyDPF-Post requires to run. To install PyDPF-Post using the downloaded wheelhouse, unzip the wheelhouse to a local directory and then run the following command from within this local directory:

pip install --no-index --find-links=. ansys-dpf-post

Beware that PyDPF-Post wheelhouses do not include the optional plotting dependencies. To allow for plotting capabilities, also download the PyVista wheel and unzip it to the same local directory before running the preceding command again.

Install in development mode#

If you want to edit and potentially contribute to PyDPF-Post, clone the repository and install it using pip with the -e development flag:

git clone https://github.com/ansys/pydpf-post
cd pydpf-post
pip install -e .

Check the installation#

Run the following Python code to verify your PyDPF-Post installation:

from ansys.dpf import post
from ansys.dpf.post import examples
simulation = post.load_simulation(examples.simple_bar)
print(simulation)