This page records many frequently asked technical questions and provides our answers to these. The focus here is on troubleshooting the installation and running the CSD Python API. For more scientifically-based questions, we direct you to the relevant sub-forums.
If your question isn’t answered here, we invite you to ask in the Technical Help sub-forum. Questions of a sensitive nature may instead be directed to firstname.lastname@example.org
Which versions of Python are supported?
We support all Python 2.7.x releases, but no others.
Can I use the CSD Python API with Anaconda Python?
On Windows and Linux, yes you can - although there are some caveats.
When installing the CSD Python API into Anaconda Python with PyQt and Qt already present the tests will fail to run. Errors such as the following
ImportError will be reported:
ImportError: /home/user/python/anaconda/1.7.0/64/bin/../lib/libQt3Support.so.4: undefined symbol: _ZNK9QMenuItem10metaObjectEv
The solution is to uninstall the Qt related packages, or to reinstall a version compiled without the –no-qt3support option.
Anaconda on Apple OS X has some known problems that will prevent the CSD Python API from running. We therefore do not recommend that you try using the CSD Python API on OS X with Anaconda Python.
How do I fix errors about “Unable to load _UtilitiesLib”?
After installing the CSD Python API on Windows, module import may fail with an error similar to ‘Unable to load _UtilitiesLib’. In this case, it likely that your computer does not contain the required Microsoft runtime libraries.These may be installed from: the Visual C++ Redistributable Package for Visual Studio 2013.
Can I use a UCS2 compatible version of Python?
The CSD Python API is unicode compatible. However, this means that one will require a Python installation with the same Universal Character Set (UCS).
The CSD Python API is compiled against a UCS4 enabled version of Python. If you use a version of Python that was compiled against UCS2 you may see the error below:
undefined symbol: _PyUnicodeUCS4_AsDefaultEncodedString
In this case you will need to compile a new version of Python with UCS4 enabled. On Linux, this can be done by downloading the source for the latest Python 2.7 release and using the commands below:
$ ./configure --prefix=/home/user/MyPython --enable- unicode=ucs4
$ ./make install
Alternatively, please do get in contact with us and we can try to make a UCS2 compiled version of the CSD Python API available to you.
How do I fix libz warnings about "no version information available"?
Depending on the version of Linux that you are using you may see a warning along the lines of:
/home/user/MyPython/python2.7/site-packages/ccdc/libz.so.1: no version information available (required by python))
To work around this please rename or remove the
$ cd /home/user/MyPython/python2.7/site-packages/ ccdc/
$ mv libz.so.1 backup.libz.so.1
Can I use the CSD Python API with IPython notebooks?
Yes, you can. You may, however, on Windows see a
RuntimeError when you import the
RuntimeError: prepare_statement failed (code 1) - no such module: FTS3 - D:\my\csd\as534be_ASER.sqlite
This is due to incompatibilities between the versions of SQLite3 used. IPython loads
C:\Python27\DLLs\sqlite3.dll before the
ccdc module loads
C:\Python27\Lib\site-packages\ccdc\sqlite3.dll. The difference between these two DLLs is that the former lacks the FTS3 sqlite module extension, which is required by some parts of the
The simplest solution is to replace the former DLL with the version shipped with the CSD Python API.
Why are my chemical diagrams wrong when I use highlighting with shrunken symbols?
When generating 2D diagrams of molecules and crystals it is recommended to set the
ccdc.diagram.DiagramGenerator.Settings.shrink_symbols setting to
False as it may otherwise give misleading images.
This issue does not manifest itself when using
ccdc.entry.Entry where the 2D coordinates are taken from the CSD.
Why do I see various “Gtk-CRITICAL” messages during tests and diagram generation?
When generating 2D diagrams of molecules and crystals on some platforms, including Debian 7.8, various “Gtk-CRITICAL” messages are written to the stderr stream by underlying libraries. This only occurs when the nose module is imported.
The generated images are correct and these messages may be safely ignored.