Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,39 @@ Install the latest release from `PyPI

pip install ansys-fluent-core


Using a virtual environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~

It is recommended to use a virtual environment when installing PyFluent to avoid conflicts with other Python packages.
A virtual environment can be created and activated with the following commands:

.. code:: console

python -m venv .venv


On Windows:

.. code:: console

.venv\Scripts\activate


On Linux and Mac OS:

.. code:: console

source .venv/bin/activate


Then, install PyFluent in the virtual environment with:

.. code:: console

python -m pip install ansys-fluent-core


Dependencies
------------
You must have a licensed copy of Ansys Fluent installed locally. PyFluent supports
Expand Down Expand Up @@ -109,6 +142,33 @@ the latest release with:

git clone https://github.com/ansys/pyfluent.git
cd pyfluent


Create and activate a virtual environment:

.. code:: console

python -m venv .venv


On Windows:

.. code:: console

.venv\Scripts\activate


On Linux and Mac OS:

.. code:: console

source .venv/bin/activate


Then, install PyFluent in the virtual environment in editable mode with:

.. code:: console

pip install pip -U
pip install -e .

Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/5178.documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add virtual environment steps in installation guides [skip tests]
54 changes: 0 additions & 54 deletions doc/source/getting_started/faqs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,60 +88,6 @@ You can use PyFluent to do tasks such as these:
additional knowledge is acquired and applied.
- Use Python to couple different Ansys products together.

.. _faqs_install:

How do you install PyFluent?
----------------------------
While :ref:`ref_installation` provides basic information for quickly installing and
launching the ``ansys-fluent-core`` package, these steps explain how to install
all PyFluent packages in a Python *virtual environment*:

#. Install Python if it is not already installed.

For Python version information, see the answer to the next question.

#. Install a supported version of Fluent: 2024 R2 SP05, 2025 R1 SP04, 2025 R2 SP03, 2026 R1, or later.

#. Set the environment variable for your installed release to point to
the appropriate Ansys installation folder.

For example, for Ansys 2025 R2, you would likely set the ``AWP_ROOT252``
environment variable to point to ``C:\Program Files\ANSYS Inc\v252``.

While you must explicitly set this environment variable on Linux, it should
be automatically set on Windows.

#. In a command window, use this code to set up and activate a local Python
virtual environment:

.. code:: bash

# Set up a local virtual environment
python -m venv venv

# Activate the virtual environment on Windows
venv\Scripts\activate

# Activate the virtual environment on Linux (csh)
source venv/bin/activate.csh

# Activate the virtual environment on Linux (bash)
. venv/bin/activate


#. In the same command window, use ``pip``, the package installer for Python, to
install the PyFluent packages:

.. code:: bash

python -m pip install ansys-fluent-core # Use Fluent’s core capabilities (mesh, solve, postprocess)
python -m pip install ansys-fluent-parametric # Use Fluent’s parametric capabilities (optional)
python -m pip install ansys-fluent-visualization # Use Fluent's postprocessing capabilities with pyvista and matplotlib (optional)

.. note::
Ansys Fluent versions prior to 2024 R2 were supported by PyFluent version 0.37 and earlier.
These versions are no longer supported in the current PyFluent releases.


Which version of Python should you use?
---------------------------------------
Expand Down
58 changes: 58 additions & 0 deletions doc/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ PyFluent can be installed, along with all its optional dependencies, using:
pip install ansys-fluent-core


Using a virtual environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~

It is recommended to use a virtual environment when installing PyFluent to avoid conflicts with other Python packages.

@seanpearsonuk seanpearsonuk Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we provide a more comprehensive rationale for using a virtual environment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanpearsonuk Using a virtual environment is a standard practice for Python development and anything more we say here will become duplicate of official Python documentation. Should we just provide a link to the Python tutorial (https://docs.python.org/3/tutorial/venv.html) here?

A virtual environment can be created and activated with the following commands:

.. code:: console

python -m venv .venv


On Windows:

.. code:: console

.venv\Scripts\activate


On Linux and Mac OS:

.. code:: console

source .venv/bin/activate


Then, install PyFluent in the virtual environment with:

.. code:: console

python -m pip install ansys-fluent-core


Development Installation
------------------------
The PyFluent source repository is available on GitHub. You can clone the repository and set up for local
Expand All @@ -26,6 +58,32 @@ development with the following commands:

git clone https://github.com/ansys/pyfluent.git
cd pyfluent

Use the following commands to create and activate a virtual environment:

.. code:: console

python -m venv .venv


On Windows:

.. code:: console

.venv\Scripts\activate


On Linux and Mac OS:

.. code:: console

source .venv/bin/activate


Then, install PyFluent within the virtual environment in editable mode with:

.. code:: console

pip install pip -U
pip install -e .
python codegen/allapigen.py # Generates the API files or
Expand Down
Loading