Installation#

PyDYNA consists of four modules, ansys.dyna.core.pre, ansys.dyna.core.solver, ansys.dyna.core.run, and ansys.dyna.core.keywords.

ansys.dyna.core.pre and ansys.dyna.core.solver use gRPC and hence need to be run using server-client connection.

Install the client#

The ansys.dyna.core package supports Python 3.9 through Python 3.12 on Windows, Linux, and MacOS.

You should consider installing PyDYNA in a virtual environment. For more information, see Python’s venv – Creation of virtual environments.

PyDYNA has three installation modes: user, developer, and offline.

Install in user mode#

Before installing PyDYNA in user mode, make sure you have the latest version of pip with this command:

python -m pip install -U pip

Then, install PyDYNA with this command:

python -m pip install ansys-dyna-core

Install in developer mode#

Installing PyDYNA in developer mode allows you to modify the source and enhance it.

Note

Before contributing to the project, ensure that you are thoroughly familiar with the PyAnsys Developer’s Guide.

Start by cloning and installing the repository with these commands:

git clone https://github.com/ansys/pydyna
cd pyDyna
pip install -e .

Install in offline mode#

If you lack an internet connection on your installation machine, you should install PyDYNA by downloading the wheelhouse archive for your corresponding machine architecture from the Releases Page.

Each wheelhouse archive contains all the Python wheels necessary to install PyDYNA from scratch on Windows and Linux for Python 3.9 through 3.12. You can install PyDYNA on an isolated system with a fresh Python installation or on a virtual environment.

For example, on Linux with Python 3.9, unzip the wheelhouse archive and install PyDYNA with these commands:

unzip ansys-dyna-core-v0.3.dev0-wheelhouse-Linux-3.9.zip -d wheelhouse
pip install ansys-dyna-core -f wheelhouse --no-index --upgrade --ignore-installed

If you’re on Windows with Python 3.9, unzip the wheelhouse archive to a wheelhouse directory and install PyDYNA using the preceding command.