I have installed the tkcalendar and xlwt using pip3 install tkcalendar and pip3 install xlwt which is successful and have up to date versions.
Running the code using the command as python3 /home/pi/programename.py works perfectly 
Using sudo before the command like sudo python3 /home/pi/programename.py fails with error

ImportError: No module named tkcalendar.

Instlling tkcalendar module using sudo apt-get install tkcalendar gives error like E:Unable to locate package tkcalendar. Please help me how to install the package and clear the error.
Try again with

pip install tkcalendar

If you use python 3:

pip3 install tkcalendar

And check with:

from tkcalendar import Calendar
NO MODULE NAMED TKCALENDAR