Normally, the installation procedure should automatically add the installation path to your Python path. If the variable “PYTHONPATH” is missing or it does not contain TimeTagger installation path, python is not able to find the Time Tagger library and import the packages.
The error typically appears as:
Traceback (most recent call last):
File "", line 10, in
import TimeTagger
ModuleNotFoundError: No module named 'TimeTagger'
The Time Tagger Python module is installed in it’s own folder along with other required compiled libraries. By default, it is located in: ‘C:\Program Files\Swabian Instruments\Time Tagger\driver\python\
The Python environment has to be aware of this folder and it must be in the python path. You can verify its presence as shown in the example below.
In [1]: import sys
In [2]: sys.path
Out[2]:
['C:\\ProgramData\\Anaconda3\\Scripts',
'C:\\Program Files\\Swabian Instruments\\Time Tagger\\driver\\python',
'C:\\ProgramData\\Anaconda3\\python311.zip',
'C:\\ProgramData\\Anaconda3\\DLLs',
'C:\\ProgramData\\Anaconda3\\lib',
'C:\\ProgramData\\Anaconda3',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32\\lib',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\Pythonwin',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\extensions']
The TimeTagger folder is added by the installer to the python path through an OS environment variable PYTHONPATH that lists paths for external modules. You can check that PYTHONPATH has correct value in the following way
In [1]: import os
In [2]: os.environ['PYTHONPATH']
Out[2]: 'C:\\Program Files\\Swabian Instruments\\Time Tagger\\driver\\python'
If this variable, for some reason, is not set right, it can be done manually using Windows tools. The PYTHONPATH is set in the global environmental variables of windows. These can be found in My Computer > Properties > Advanced System Settings > Environment Variables .