FAQs
Using the CSD Python API on a system that has no display
Solution
Some aspects of the CSD Python API require an active display to be present, and by default the API will require a display to be present when importing the ccdc module. This scenario is most common when using a Linux server that has no display of its own.
If you are using the CSD Python API on a system without a display then there are a couple of options available to you to use the API:
- Set the environment variable CCDC_PYTHON_API_NO_QAPPLICATION to any value prior to using the API. This will allow the ccdc module to be imported, but only functionality that does not require access to a display will work (for example, diagram generation will fail as this requires a display). For example:
export CCDC_PYTHON_API_NO_QAPPLICATION=1 - Use a virtual display, such as that provided by xdummy and ensure the DISPLAY variable is set to use the port that the virtual display is using. This will allow full use of all functionality in the API. For example, if you have installed and run xdummy to be running on port 77, then you could use
export DISPLAY=localhost:77