TC-Python: Setting Environment Variables
macOS and Linux
In order to use TC-Python on macOS and Linux you need to set some environment variables.
TC25B_HOME=/Applications/Thermo-Calc-2025b.app/Contents/Resources
User Credential License Types
If you have a license based on user credentials:
TC_LICENSE_SPRING=y
License File Type Activations
If you use a license server:
LSHOST=<name-of-the-license-server>
If you have a node-locked license:
LSHOST=NO-NET
LSERVRC=/Users/Shared/Thermo-Calc/lservrc
If running in the terminal these can be set using export LSHOST=NO-NET
, etc.
PyCharm IDEs
In PyCharm, you can add environment variables in the configurations.
For other operating systems, the configuration can be done in the same way as described below.
- Select Run → Edit Configurations to open the Run/Debug Configurations window.
- Choose Templates and then Python.
- Enter the environment variable(s) by clicking the button to the right of the Environment Variables text field. Now the environment variables(s) are set for each new configuration by default.
Existing configurations need to be removed and recreated to obtain the environment variables in them.