> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation with pip (recommended)

## Server software requirements

To use MI Scripting Toolkit 5.0, your Granta MI server must be running 2024 R2 or later, which includes Service Layer
Interface 23/10.

## Client software requirements

MI Scripting Toolkit for pip is supported on the following platforms:

| Platform | Python 3.11 | Python 3.12 | Python 3.13 | Python 3.14 |
| - | - | - | - | - |
| Windows <sup>[1](#id7)</sup> | Recommended | Recommended | Recommended | Recommended |
| Linux | Ubuntu 22.04 <sup>[2](#id8)</sup> | Recommended | Recommended | Recommended |
| Ubuntu 24.04 <sup>[3](#id9)</sup> | Supported | Supported | Recommended | Supported |
| SUSE Linux Enterprise 15 SP5+, 16 SP0  <sup>[4](#id10)</sup> | Supported | Supported | Recommended | Supported |
| RHEL 8.8, 8.10, 9.4, 9.6 <sup>[5](#id11)</sup> | Supported | Supported | Recommended | Supported |
| Rocky Linux 8.10, 9.4, 9.6 <sup>[6](#id12)</sup> | Supported | Supported | Recommended | Supported |

Test platform details:

* **\[1]** Automated testing performed on Windows Server 2022. Manual testing performed on Windows Server 2025 and Windows 11.
* **\[2]** Automated testing performed on Ubuntu 22.04 development release. Manual testing performed on Ubuntu 22.04.5.
* **\[3]** Automated testing performed on Ubuntu 24.04 development release. Manual testing performed on Ubuntu 24.04.2.
* **\[4]** Automated testing performed on SLES 15 SP4 and 16 SP0. Manual testing performed on SLES 15 SP6.
* **\[5]** Automated testing performed on RHEL 8.8 and 9.6. Manual testing performed on RHEL 8.10.
* **\[6]** Automated testing performed on Rocky Linux 8.9 and 9.6. Manual testing performed on Rocky Linux 9.6.

### Linux requirements

The wheel provided for installation via pip on Linux is a ‘manylinux’ wheel and is compatible with any
manylinux 2.28-compliant Linux platform. This typically means that the platform must be based on `glibc>=2.28`.

#### NOTE

The use of MI Scripting Toolkit on other Linux platforms that meet this threshold is not supported or tested, but it is
anticipated that it will function as expected.

For Linux platforms that do not meet this requirement, it is recommended to either use a compatible docker container or
to install via [conda](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/getting_started/conda.md). Whilst the use of conda packages in other platforms is not tested, it is
anticipated that they will function as expected.

MI Scripting Toolkit on Linux requires additional shared libraries beyond the glibc runtime. The required shared library names are
listed in the left-hand column; these usually represent symbolic links to shared libraries. The full name of the shared
library on our build environment is listed in the right-hand column.

| Required shared library name | Full library path on the ManyLinux 2.28 build image |
| - | - |
| `libc.so.6` | `/lib64/libc.so.6` |
| `libdl.so.2` | `/lib64/libdl.so.2` |
| `libgcc_s.so.1` | `/lib64/libgcc_s.so.1` |
| `libm.so.6` | `/lib64/libm.so.6` |
| `libpthread.so.0` | `/lib64/libpthread.so.0` |
| `librt.so.1` | `/lib64/librt.so.1` |
| `libstdc++.so.6` | `/lib64/libstdc++.so.6` |
| `libuuid.so.1` | `/lib64/libuuid.so.1` |
| `libz.so.1` | `/lib64/libz.so.1` |

### Required third-party packages

MI Scripting Toolkit depends on the following third-party packages:

* filetype>=1.2.0
* packaging>=24.0

#### NOTE

The list above include only the direct dependencies of the MI Scripting Toolkit package. The transitive dependencies
(dependencies of dependencies) are not given here, since in general they depend on the specific version of the
dependency that is selected, and as a result will change over time.

To determine the full requirements at a particular point in time, install the Scripting Toolkit into an empty virtual
environment (see [https://docs.python.org/3/library/venv.html](https://docs.python.org/3/library/venv.html) for details), and then use `pip list` or `pip
freeze` to display the installed packages.

These third-party packages are not provided with MI Scripting Toolkit, but **must** be installed before use. Follow the
installation instructions in [Installing and upgrading MI Scripting Toolkit](#installing-and-upgrading-pip) to automatically download compatible versions of these
packages from [PyPI](https://pypi.org/) and install them alongside MI Scripting Toolkit. To install MI Scripting Toolkit without access to PyPI, see
[Offline installation](#offline-installation-pip).

### Installation preparation

MI Scripting Toolkit is provided as a zip file, and is available from the Downloads page on the Ansys Customer Portal. All
instructions on this page assume a Windows environment, and that the zip file has been downloaded and unzipped to the
location `C:\Users\user\scripting_toolkit`. Replace this path as required for your environment.

To install MI Scripting Toolkit in a Linux environment, replace the example Windows path with the appropriate Linux path. For
example, the path `C:\Users\user\scripting_toolkit\pip` in Windows would be equivalent to
`/home/user/scripting_toolkit/pip` on Linux.

## Installing and upgrading MI Scripting Toolkit

#### Versionchanged

Changed in version 5.0: MI Scripting Toolkit is now provided as a package called `ansys-grantami-core`. `GRANTA_MIScriptingToolkit` is provided
for compatibility purposes only, and will be removed in a future release.

When `GRANTA_MIScriptingToolkit` is installed, imports from the `GRANTA_MIScriptingToolkit` and
`granta_miscriptingtoolkit.granta` modules succeed and a
[`APIDeprecationWarning`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/exceptions#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning) is emitted.

Install MI Scripting Toolkit in a virtual environment. If you are installing MI Scripting Toolkit in an activated virtual environment, enter
the following:

```shell theme={null}
$ pip install --upgrade ansys-grantami-core --find-links="C:\Users\user\scripting_toolkit\pip"
```

If you are installing MI Scripting Toolkit in a Python environment which is not available on the path, enter the following:

```shell theme={null}
$ path/to/python -m pip install --upgrade ansys-grantami-core --find-links="C:\Users\user\scripting_toolkit\pip"
```

When installation is complete, the MI Scripting Toolkit files are installed into the Python site-packages location.

#### WARNING

Do not manually install the `ansys-grantami-core` wheel file. There are additional dependencies included in the
`pip` folder which must be installed for MI Scripting Toolkit to function correctly.

### pip extras

MI Scripting Toolkit defines additional optional dependencies in the form of extras:

* `[notebooks]`: Required to execute the [Example notebooks](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/examples).
* `[oidc]`: Required to use OpenID Connect (OIDC) authentication.

To install an extra, include the extra name after the package name when installing MI Scripting Toolkit. For example, to install
MI Scripting Toolkit with the additional notebook dependencies:

```shell theme={null}
$ pip install --upgrade ansys-grantami-core[notebooks] --find-links="C:\Users\user\scripting_toolkit\pip"
```

Or to install both the notebook and OIDC dependencies:

```shell theme={null}
$ pip install --upgrade ansys-grantami-core[notebooks,oidc] --find-links="C:\Users\user\scripting_toolkit\pip"
```

The `[notebooks]` extra includes the following additional dependencies:

* Linux and Windows platforms:
  : - jupyterlab>=4.0.0
  * matplotlib>=3.6.0
  * numpy>=1.23.5
  * pandas>=2.1
  * python-docx>=1.1.0
  * python-pptx>=1.0.0
  * scipy>=1.11.0
  * seaborn>=0.13
* Windows only:
  : - docx2pdf>=0.1.8
  * tqdm\[notebook]>=4.0

The `[oidc]` extra includes the following additional dependencies:

* keyring\<26,>23

If you encounter dependency errors when installing the `[notebooks]` extra, you may need to first upgrade `pip`:

```shell theme={null}
python -m pip install --upgrade pip
```

## Upgrading from MI Scripting Toolkit v3.0 or earlier

#### WARNING

The MI Scripting Toolkit package name changed with v3.1 from `miscriptingtoolkit` to `GRANTA_MIScriptingToolkit`, and has
since changed to `ansys-grantami-core`. If you are upgrading from MI Scripting Toolkit v3.0 or earlier, you **must** follow
the instructions in this section or `pip install` may fail with dependency conflicts.

If you are using a virtual environment, you should delete your virtual environment and create a new one.

If you are not using a virtual environment, you should uninstall older version of MI Scripting Toolkit by entering the following
into the command line:

```shell theme={null}
$ pip uninstall miscriptingtoolkit
```

Or if you are using a Python environment which is not available on the path:

```shell theme={null}
$ path/to/python -m pip uninstall miscriptingtoolkit
```

## Offline installation

To install MI Scripting Toolkit without access to PyPI, first download the required third-party dependencies using a Python
environment with PyPI access. Enter the following into the command line to download the wheels into the
`C:\Users\user\all_wheels` directory:

```shell theme={null}
$ pip download ansys-grantami-core --find-links=pip --dest="C:\Users\user\all_wheels"
```

Copy the `all_wheels` directory to the machine without access to PyPI, and enter the following into the command line
to install MI Scripting Toolkit using the packages in the `all_wheels` directory:

```shell theme={null}
$ pip install ansys-grantami-core --find-links="C:\Users\user\all_wheels" --no-index
```

These instructions describe how to download the required packages for the current platform only. To download packages
for a different platform, for example to download Linux wheels in a Windows environment, see the
[pip download](https://pip.pypa.io/en/stable/cli/pip_download/) documentation.
