Install PySTK locally in Linux#

This topic provides details on installing PySTK locally in Linux platforms.

Note

This topic assumes that you have a local installation of STK and a valid license in your machine.

Download artifacts#

Start by downloading PySTK wheel or source artifacts for Linux:

Wheel artifacts are the preferred option for installing PySTK:

Artifact

ansys_stk-0.2.1-py3-none-any.whl

Size

1.93 MB

SHA-256

f0e2f9c85a8a3efc8b6a739373fe4a7b15e5ed6ec8856f0244f0ebf31f3a7065

Source distribution for installing PySTK:

Artifact

ansys_stk-0.2.1.tar.gz

Size

1.83 MB

SHA-256

f49411b7bfbd80726792ae32e9d1fa8e82e8f18d6454423f0e72b37ee58f499f

Install artifacts#

Install Linux artifacts by using the pip command:

python -m pip install "ansys-stk==0.2.1"
python -m pip install ansys_stk-0.2.1-py3-none-any.whl
python -m pip install ansys_stk-0.2.1.tar.gz

Install extra artifacts#

PySTK includes some additional features such as gRPC connection support or Jupyter widgets for visualization. These features require some extra artifacts to be installed, either pulling those dependencies from the public PyPi registry or from the wheelhouses included on the artifacts page. A wheelhouse provides all of the required dependencies. It facilitates deploying PySTK on isolated networks that do not have access to the public PyPi registry.

Start by selecting the additional feature group to install with PySTK. Finally, select the type of installation.

Install the extra dependencies by running:

python -m pip install ansys-stk[all]

Download the wheelhouse for all extra artifacts. Then, decompress it by running:

unzip <wheelhouse.zip> -d wheelhouse

Finally, install the extra dependencies by running:

python -m pip install --find-links wheelhouse ansys-stk[all]

Dependencies included with the all target are:

PyAnsys project Version
grpcio>=1.73.1 latest
jupyter-rfb>=0.5.3 latest
libcst>=1.8.2 latest
matplotlib>=3.10.3 latest
numpy>=2.2.6 latest
pandas>=2.3.1 latest
pillow>=11.3.0 latest
protobuf>=6.31.1 latest
sidecar>=0.7.0 latest
simplejpeg>=1.8.2 latest

Install the extra dependencies by running:

python -m pip install ansys-stk[core]

Download the wheelhouse for all extra artifacts. Then, decompress it by running:

unzip <wheelhouse.zip> -d wheelhouse

Finally, install the extra dependencies by running:

python -m pip install --find-links wheelhouse ansys-stk[core]

Dependencies included with the core target are:

PyAnsys project Version

Install the extra dependencies by running:

python -m pip install ansys-stk[extensions]

Download the wheelhouse for all extra artifacts. Then, decompress it by running:

unzip <wheelhouse.zip> -d wheelhouse

Finally, install the extra dependencies by running:

python -m pip install --find-links wheelhouse ansys-stk[extensions]

Dependencies included with the extensions target are:

PyAnsys project Version
matplotlib>=3.10.3 latest
pandas>=2.3.1 latest

Install the extra dependencies by running:

python -m pip install ansys-stk[grpc]

Download the wheelhouse for all extra artifacts. Then, decompress it by running:

unzip <wheelhouse.zip> -d wheelhouse

Finally, install the extra dependencies by running:

python -m pip install --find-links wheelhouse ansys-stk[grpc]

Dependencies included with the grpc target are:

PyAnsys project Version
grpcio>=1.73.1 latest
protobuf>=6.31.1 latest

Install the extra dependencies by running:

python -m pip install ansys-stk[jupyter]

Download the wheelhouse for all extra artifacts. Then, decompress it by running:

unzip <wheelhouse.zip> -d wheelhouse

Finally, install the extra dependencies by running:

python -m pip install --find-links wheelhouse ansys-stk[jupyter]

Dependencies included with the jupyter target are:

PyAnsys project Version
jupyter-rfb>=0.5.3 latest
numpy>=2.2.6 latest
pillow>=11.3.0 latest
sidecar>=0.7.0 latest
simplejpeg>=1.8.2 latest

Install the extra dependencies by running:

python -m pip install ansys-stk[migration]

Download the wheelhouse for all extra artifacts. Then, decompress it by running:

unzip <wheelhouse.zip> -d wheelhouse

Finally, install the extra dependencies by running:

python -m pip install --find-links wheelhouse ansys-stk[migration]

Dependencies included with the migration target are:

PyAnsys project Version
libcst>=1.8.2 latest

Verify installation#

Verify a successful installation of PySTK by running:

from ansys.stk.core.stkengine import STKEngine

stk = STKEngine.start_application(no_graphics=True)
print(f"STK version is {stk.version}")

Output:

STK version is 13.0.1