Migrating to Python 3.13

Applies to TestComplete 15.79, last modified on November 18, 2025

Overview

TestComplete now uses Python 3.13 as the default scripting engine for all new installations and upgrades.

If you are upgrading from a version that used Python 3.11:

  • Python 3.13 will be installed and set as the active scripting engine.

  • Python 3.11 files will remain on your system to support rollback or migration.

  • After the upgrade, TestComplete will no longer use Python 3.11 for any scripting operations.

This is a significant version upgrade in Python, which means developers should expect breaking changes. Key updates include:

  • Removal and deprecation of certain APIs.

  • Changes in internal module behavior.

  • Structural updates in script discovery and module isolation.

Note:

Python's standard version upgrade process drives these changes and is not specific to TestComplete. For details about the Python-related fix, see What's New in TestComplete 15.79. For additional Python compatibility changes, see Python 3.13 Changelog.

Changes in TestComplete

  • Manually reinstall all Python 3.11 third-party packages in Python 3.13.

  • Install PIP in Python 3.13, if missing, by running the required command to enable package installation.

    python -m ensurepip
  • Python 3.13 does not automatically detect scripts located outside the project folder.

Getting Started with Python and Third-Party Libraries

TestComplete’s Python 3.13 environment includes only the standard library.

Note:

You must manually install additional libraries, if any.

Installing Third-Party Libraries

Use the Python terminal from TestComplete’s embedded Python 3.13 environment to install additional libraries.

<TC Install Directory>\Bin\Extensions\Python\Python313\python.exe -m pip install <package-name>

Example: Installing the requests library and using it in TestComplete scripts.

<TC Install Directory>\Bin\Extensions\Python\Python313\python.exe -m pip install requests

In your TestComplete Python script:

Python

import requests
response = requests.get('https://example.com')
Log.Message(response.status_code)
Note:
  • TestComplete does not provide any pre-installed third-party libraries.

  • For the 64-bit version of TestComplete, use the 64-bit Python executable.

    x64\Bin\Extensions\Python\Python313\python.exe
  • TestComplete places the installed packages in the following locations:

    Bin\Extensions\Python\Python313\Lib\site-packages
    For 64-bit:
    x64\Bin\Extensions\Python\Python313\Lib\site-packages

Migrating to Python 3.13

  1. Generate a Backup of Existing Python Packages.

    • Open the Python 3.11 terminal from TestComplete’s embedded environment.

    • Run the following command to generate the requirements.txt file.

      <TC Install Directory>\Bin\Extensions\Python\Python311\python.exe -m pip freeze > requirements.txt
  2. Install PIP in Python 3.13, if missing.

    Run the required command to enable package installation.

    <TC Install Directory>\Bin\Extensions\Python\Python313\python.exe -m ensurepip
  3. Reinstall Packages in Python 3.13.

    Run the appropriate command in the Python 3.13 terminal to reinstall all packages.

    <TC Install Directory>\Bin\Extensions\Python\Python313\python.exe -m pip install -r requirements.txt
Note:

If you are using the 64-bit version of TestComplete, use the Python executable located in:

x64\Bin\Extensions\Python\Python311\

or

x64\Bin\Extensions\Python\Python313\, as applicable.

Best Practices for Managing Python Files in TestComplete

To ensure TestComplete detects your Python files:

  • Place all Python files inside the project folder.

  • Organize files into logical subfolders, such as Scripts, Libs, and Helpers.

Recommended Structure:

The Best Practice for Managing Python Files in TestComplete
Note:

It is recommended to store all files in the project folder to minimize manual configuration and ensure reliable script discovery in Python 3.13.

Using External Python Files

If your scripts are stored outside the project folder, add their paths to the Python search path manually at runtime.

Example: If you have external.py in C:\ExternalScripts:

Python

import sys
sys.path.append(r"C:\ExternalScripts")
import my_external_script
Note:

Python 3.13 does not automatically detect external script files. To use scripts stored outside the project folder, you must explicitly add their paths to the Python search path at runtime.

Highlight search results