Installing TC‑Python with a Bundled Python-interpreter
TC-Python can be installed using a Python-interpreter that is bundled to Thermo‑Calc. This interpreter has TC-Python preinstalled together with some popular Python packages. This is the recommended option for new users to TC‑Python who may only want to run the examples.
The bundled interpreter package is also used to run the Property Models in Thermo‑Calc. Do not make changes to interpreter packages or this can stop Thermo‑Calc from working correctly. To fix issues caused by changes to an interpreter, completely uninstall Thermo‑Calc and start over, either with the bundled interpreter package or using interpreters of your choice.
If you are planning to do more advanced calculations that require other external packages then you may want to follow these instructions instead: Installing TC‑Python Into a Python-interpreter of Your Choice
Limitations
The following examples cannot be run with the bundled Python-interpreter as additional packages are required: pyex_M_01_Input_from_file.py
(pandas) and pyex_M_02_Output_to_file.py
(pandas, lxml, h5py).
The bundled Python 3 interpreter contains the following major packages:
- colour-science
- matplotlib
- numpy
- scikit-learn
- scipy
- pandas
- pyvista
- TC-Python
- tmm
If you have recommendations for additional packages to include (see below), send an email to Thermo‑Calc Support.
These TC-Python examples require additional packages that are not available in the bundled Python-interpreter, and thus cannot be run: pyex_M_01_Input_from_file.py
and pyex_M_02_Output_to_file.py
.
Step 1. Install an IDE (Integrated Development Environment)
Any editor can be used to write the Python code, but an IDE is recommended, e.g. PyCharm. These instructions are based on the use of PyCharm.
Use of an IDE gives you access to code completion, which helps when you use the API as it gives you the available methods on the objects you are working with.
- Navigate to the PyCharm website: https://www.jetbrains.com/pycharm/download.
- Click to choose your OS and then click Download. You can use the Community version of Pycharm.
- Follow the instructions. It is recommended you keep all the defaults.
For Mac installations, you also need to set some environment variables as described below in macOS: Setting Environment Variables.
Step 2. Configure PyCharm to Use the Bundled Python-interpreter
Open PyCharm and configure the interpreter:
- Go the menu File → Settings.
- Navigate in the tree to Project: YourProjectName and choose Project Interpreter.
- Click on the settings symbol close to the Project Interpreter dropdown menu and choose Add.
- Select System Interpreter and add the bundled Thermo‑Calc Python 3 interpreter, which is located in a folder based on the operating system:
Operating system Path to the bundled Python-interpreter Windows C:\Program Files\Thermo‑Calc\2025b\python\python.exe
Linux /home/UserName/Thermo‑Calc/2025b/python/bin/python3
macOS /Applications/Thermo‑Calc-2025b.app/Contents/Resources/python/bin/python3
- Select the interpreter and confirm.
Step 3. Run a TC-Python Example
It is recommended that you open one or more of the included examples to both check that the installation has worked and to start familiarizing yourself with the code.
If you have a license activation type based on user credentials you first need to activate your license. See License Activation with User Credentials.
Open the TC-Python Project in PyCharm
When you first open the TC-Python project and examples, it can take a few moments for the Pycharm IDE to index before some of the options are available.
-
Open PyCharm and then choose File → Open. The first time you open the project you will need to navigate to the path of the TC-Python installation based on your operating system.
Operating system Path to the TC-Python folder Windows C:\Users\UserName\Documents\Thermo‑Calc\2025b\SDK\TC-Python
Linux /home/UserName/Thermo‑Calc/2025b/SDK/TC-Python
macOS /Users/Shared/Thermo‑Calc/2025b/SDK/TC-Python
- Click the Examples folder and then click OK.
- From any subfolder:
- Double-click to open an example file to examine the code.
- Right-click an example and choose Run.
If you are not following the recommended approach and create a new project (File → New Project…), you need to consider that by default the options to choose the interpreter are hidden within the Create Project window. For this, click Project Interpreter: New Virtual Environment and in most cases choose your System Interpreter containing the Python bundled to Thermo‑Calc instead of the default New Virtual Environment.