I'm on Linux and after running taskcoach.py I get the message "ERROR: cannot import the library 'taskcoachlib' "

Created by Frank Niessink
Keywords:
Linux
Last updated by:
Frank Niessink

On Xubuntu 11.10, the taskcoachlib library is installed in /usr/share/pyshared but that folder is not in the python path. Edit your .profile (/home/<your username>/.profile) and add a line "export PYTHONPATH=/usr/share/pyshared:$PYTHONPATH". Then logout and login to activate it and Task Coach should start from the menu as expected.

Another reason that that taskcoach.py cannot find its library (taskcoachlib) may be that the python version you are using to run taskcoach.py is different than the python version where the taskcoachlib folder was installed to. The taskcoachlib folder is located in /usr/lib/python2.X/site-packages. If you find the taskcoachlib folder and run taskcoach.py with the same python version, Task Coach should run. So, if taskcoachlib is in /usr/lib/python2.X/site-packages and taskcoach.py is located in /usr/bin then 'python2.X /usr/bin/taskcoach.py' should work.

To solve this more permanently you can move the taskcoachlib folder to the site-packages folder of your default python. To find out what your default python is, just start python from the command line, look for the version number and then exit with Control-D. Next, move the taskcoachlib folder from its current location to the site-packages folder of your default python version as follows (2.D is the version number of your default python version, 2.C is the version number where taskcoachlib was installed): 'mv /usr/lib/python2.C/site-packages/taskcoachlib /usr/lib/python2.D/site-packages'. Now running taskcoach.py should work.