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.

  1. Select Run → Edit Configurations to open the Run/Debug Configurations window.
  2. Choose Templates and then Python.
  3. 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.