SDK TC-Python Quick Install Guide PDF
SDK TC-Python Quick Install Guide PDF
There is an HTML help file you can open in your browser, plus a PDF of the
same content, and several examples available with your Thermo-Calc
installation. The TC-Python API Reference Guide is also available on the web.
Once you have installed TC-Python, go to Thermo-Calc and from the menu select Help →
Manuals Folder and go to:
This quick guide helps you to get a working TC-Python API installation.
If you already have a Python distribution installation, version 3.5 or higher, skip
this step.
These instructions are based on using the Anaconda platform for the Python distribution.
Install version 3.5 or higher to be able to work with TC-Python, although it is recommended
that you use the most recent version.
Install Anaconda
2. On the Select Components window, click to select the TC-Python check box.
The installation location for this API is the same as for other SDKs and
based on the OS. For details, see "Default Directory Locations" in the
Thermo-Calc Installation Guide.
On Windows, it is recommended you use the Anaconda distribution prompt (i.e. Anaconda),
especially if you have other Python installations.
Do not use Virtual Environments unless you have a good reason to do so. Also
see "Fixing Potential Issues with the Environment" on page 6.
1. Open the command line. For example, in Anaconda on a Windows OS, go to Start →
Anaconda → Anaconda Prompt.
2. At the command line, enter the following. Make sure there are no spaces at the end
of the string or in the folder name or it will not run:
pip install <path to the TC-Python folder>/TC_Python-
<version>-py3-none-any.whl
For Mac installations, you also need to set some environment variables as
described below in Mac OS: Setting Environment Variables .
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.
1. 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 as done in Step 4.
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. Therefore,
click Project Interpreter: New Virtual Environment and in most cases choose
your System Interpreter instead of the default New Virtual Environment.
In case of problems you may wish to uninstall the previous version of TC-Python in advance:
pip uninstall TC-Python
pip install <path to the TC-Python folder>/TC_Python-<version>-
py3-none-any.whl
However, that should normally not be required. Note that on Linux usually pip3 is used.
You can check the currently installed version of TC-Python by running:
Diagnostic Script
A new diagnostic script is available as a Miscellaneous example (diagnostics.py) as well as in
the Troubleshooting section of the TC-Python guide. Information about the script is also
available on our website. The script automatically prints useful suggestions that, in many
cases, will help you to fix the problem yourself. If you are unable to solve the problem,
contact us for support.
It is important to run the diagnostic script EXACTLY the same way as you run your TC-Python
script (in the same IDE, same project, same Python environment, same Jupyter notebook,
etc).
The script automatically prints useful suggestions that, in many cases, will help you to fix the
problem yourself. If you are unable to solve the problem, contact us for support.