If you can do the import if you start python on the command line, then it should be possible to also run the canon generator from the command line instead of inside pyscripter?
It could be that e.g. pyscripter by default is set up to use a different python executable than the one you use on the command line (another version of python perhaps, for which music21 is not installed), but such things are not really easy to diagnose “by email”.