Why verify your installation
Verifying your installation ensures that:- The DPF server is correctly installed and accessible.
- PyDPF-Core can communicate with the server.
- Your licensing is properly configured.
- Your environment is ready for the exercises in the next chapter.
Testing your installation
The simplest way to verify your installation is to start a DPF server session using PyDPF-Core.Step1: Open a Python environment
Open a Python interpreter, a Jupyter notebook, or create a Python script file.Step2: Import PyDPF-Core
Start by importing the PyDPF-Core library:Step3: Start a DPF server
Create a DPF server instance by running:- Locate the DPF server installation on your system.
- Start a new server instance.
- Establish a connection between the client (PyDPF-Core) and the server.
Step4: Verify licensing
To confirm that your licensing is properly configured, test running an entry-level operator. Entry operators don’t require a premium license and are a good way to verify basic functionality:Expected output for licensing test
What if something goes wrong
If you encounter errors during these steps, here are some common issues and solutions:Import error
Error:ModuleNotFoundError: No module named 'ansys.dpf.core'
Solution: PyDPF-Core is not installed or not in your Python path.
Reinstall PyDPF-Core using pip install ansys-dpf-core and make sure the expected Python environment is active.
Server start error
Error:ValueError: Unable to locate any Ansys installation.
Solution: The DPF server is not installed or PyDPF-Core cannot find it.
- If using Ansys installation: Verify Ansys is installed and the
AWP_ROOT{version}environment variable is set (e.g.,AWP_ROOT252for 2025 R2) - If using standalone package: Make sure you installed it with
pip install -e .from the extracted folder - Alternative: Set the
ANSYS_DPF_PATHenvironment variable to point directly to your Ansys installation folder (e.g.,C:\Program Files\ANSYS Inc\v252)
Licensing error: license agreement not accepted
Error:RuntimeError: DPF Preview License Agreement terms must be accepted using the ANSYS_DPF_ACCEPT_LA environment variable set to Y.
Solution: The license agreement has not been accepted. Follow these steps:
-
Set the environment variable
ANSYS_DPF_ACCEPT_LAtoYas described in Licensing -
Restart your environment:
- Close and reopen your terminal/command prompt
- Restart your Python interpreter or IDE
- This ensures the new environment variable is loaded
-
Verify the variable is set:
- Windows:
$env:ANSYS_DPF_ACCEPT_LA(should returnY) - Linux/macOS:
echo $ANSYS_DPF_ACCEPT_LA(should returnY)
- Windows:
- Try starting the server again
- Make sure you set the environment variable permanently (not just temporarily)
- Check that you’re running Python in the same environment where you set the variable
- For virtual environments, you may need to set the variable within the activated environment
Licensing error: no license source found
Error:Exception: Failed to check out license or Unable to reach a license server
Solution: DPF cannot find a valid Ansys license. The action to take depends on your setup:
- If using DPF from an Ansys installation: the license configuration is normally inherited from Ansys. Verify that your Ansys license is working (for example, try launching Ansys Mechanical). If the Ansys license itself is not reachable, contact your Ansys license administrator.
-
If using the standalone DPF server: you must provide a license source explicitly via the
ANSYSLMD_LICENSE_FILEenvironment variable, as described in Licensing. Make sure you have:- A valid Ansys license file, or
- Access to a running Ansys license server on your network
gRPC secure connection error (mTLS)
Error:RuntimeError: grpc::stream_provider:0<-error code 10:DPF gRPC mTLS: Missing certificates directory on pin 7, define ANSYS_GRPC_CERTIFICATES or use --certs-dir
Cause: Starting with Ansys 2026 R1 (and select service packs for Ansys 2025 R2, 2025 R1, and 2024 R2),
gRPC communication between a DPF client and a DPF server defaults to requiring
mutual TLS (mTLS)
authentication. Both the client and the server must have valid mTLS certificates configured.
Solution: Choose one of the following options:
-
Option A — Configure mTLS certificates (recommended for production):
Generate mTLS certificates and point both the client and the server to them
by setting the
ANSYS_GRPC_CERTIFICATESenvironment variable to the directory containing the certificates. See Generating certificates for mTLS for detailed instructions. -
Option B — Disable mTLS (simplest for local development):
Set the
DPF_DEFAULT_GRPC_MODEenvironment variable toinsecureon both the client machine and the server machine. This reverts to the previous unencrypted gRPC behavior.
InProcess mode (used by dpf.start_local_server() without arguments) is
not affected.