Configuring License¶
TC-Python requires a license to run, you can obtain a license from the Thermo-Calc support support@thermocalc.com.
If you have no valid license, an exception will be thrown that states: NO LICENSE: No activated license for TC-Python. Depending on the type of license, different steps are required to configure TC-Python to use it.
Environment variables¶
Some environment variables need to be set. On Windows this is normally done during the installation of Thermo-Calc, but on Linux and macOS this needs to be performed for each used IDE or terminal. Details are described in the chapter Setting Environment Variables.
License activation¶
Only required for licenses with user credentials.
You need to activate the TC-Python license once on your computer. This license differs from that for the Thermo-Calc application and thus it is not sufficient to activate only the Thermo-Calc GUI.
The activation is done with the methods in the class tc_python.license.LicenseManager
. Depending on the
type of license various methods are available, for example for online and offline activation.
It is recommended to simply run the example Miscellaneous/pyex_M_04_license.py
to perform the activation
and deactivation. By default an online activation is performed, but you can choose another method by activating
another method among those being commented out at the end of the file.
Note
You need to deactivate the license if you want to use it on another computer.