Installing Python
This topic provides instructions for installing Python and the notebook package.
Python System Requirements for the STK application
To use Python with the Ansys Systems Tool Kit® (STK®) application, ensure the following requirements are met:
-
Python version- Python 3.9 or greater is required.
-
STK Python API Installation - You must install the STK Python API to interact with STK from Python scripts. The API provides the necessary libraries and bindings to control the STK application via Python. The STK Python API is packaged as a wheel file that can be installed using pip. The wheel file is included with the STK software install directory in <Install Dir>\bin\AgPythonAPI. For more information, installation steps are available here: STK Python API
The Ansys STK application does not install Python or the STK Python API automatically. You are responsible for ensuring the correct Python version is installed and that the STK Python API is properly set up in your environment.
Install Python on devices with internet connectivity
- Download Python from https://python.org/downloads.
- Install Python. Select the option to add Python to your PATH. This is a recommendation, as it is possible to proceed without doing so.
- Open a Command prompt.
- Create a directory (e.g., mkdir%TEMP%\PythonPackages) into which you can copy additional required packages.
- Use pip to download the notebook package and all its dependent packages.
- If you chose not to add Python to your PATH, change directory to the Scripts directory where you installed Python.
- Enter the following at the command prompt:
pip download -d %TEMP%\PythonPackages notebook
Install Python on an offline machine
- Obtain the Python Installer and downloaded packages from a device with internet connectivity (see step 1 above).
- Install Python. Select the option to add Python to your PATH. This is a recommendation, as it is possible to proceed without doing so.
- Open a Command prompt.
- Use pip to install the notebook package and all its dependent packages.
- If you chose not to add Python to your PATH, change directory to the Scripts directory where you installed Python.
- Enter the following at the command prompt:
pip install --no-index --find-links %TEMP%\PythonPackages notebook