Hi @Yanfei-Geng,
That MemoryError
that you are seeing is a pretty clean indicator that the issue is with the amount of memory, not with the data (which would cause a different error earlier). E.g., see this forum post.
Some reference databases can take lots of memory to train classifier. E.g., SILVA database often takes ~32 GB to train. We do have pre-trained 16S rRNA gene classifiers that can help bypass this step.
Good luck!