Why I got unsatisfactory result when I use svm model in scikit-learner to recognize handwriting figures in MNIST?

I use the svm model in scikit-learner to predict handwriting in MNIST.

However, the result I got is confused. When I use trained model to predict training set that already used in learning procedure the accuracy is 100%

When dealing with the test data I only got about 11% accuracy.

I cannot find out the reason except overfitting. Does overfitting has such a strong influence on the outcome?

# coding:utf-8
from numpy import *
from sklearn import svm
from sklearn.externals import joblib
def loadData(fileName):
    fr = open(fileName)
    numFeat = len(fr.readline().split(',')) - 1       
    featMatTrain = []                                        
    labelVecTrain = []                                      
    featMatTest = []                                       
    labelVecTest = []                                     
    i = 0
    for line in fr.readlines():
        i = i + 1
        if i != 1 and i <=30000:
             curLine = line.strip().split(',')        
             curLine = map(float,curLine)              
             labelVecTrain.append(curLine[0])           
             featMatTrain.append(curLine[1:numFeat])       
        if i >= 30000:
             curLine = line.strip().split(',')      
             curLine = map(float,curLine)              
             labelVecTest.append(curLine[0])              
             featMatTest.append(curLine[1:numFeat])      
    print '*************************** the training data we got: *****************************'
    print 'featMat:''type of element:',type(featMatTrain) ,'shape of featMat:', shape(featMatTrain)
    print 'labelVec:''type of element:',type(labelVecTrain),'shape of labelVec:',shape(labelVecTrain)
    print 'featMat:''type of element:',type(featMatTest) ,'shape of featMat:', shape(featMatTest)
    print 'labelVec:''type of element:',type(labelVecTest),'shape of labelVec:',shape(labelVecTest)
    return array(featMatTrain),array(labelVecTrain),array(featMatTest),array(labelVecTest)

featMatTrain,labelVecTrain,featMatTest,labelVecTest= loadData('C:/Users/sun/Desktop/train.csv')    
clf = svm.SVC()                                                  
clf.fit(featMatTrain,labelVecTrain)                                           
joblib.dump(clf,'svmModel.pkl')                                     
print '***************** we finish training **********************'
labelVecPredict1 = clf.predict(featMatTrain)
labelVecPredict2 = clf.predict(featMatTest)
print '***************** we finish predicting **********************'
count1 = 0.0
for i in range(len(featMatTrain)):
    if labelVecPredict1[i] == labelVecTrain[i]:
        count1 = count1 + 1
print '************* the result of predicting training set ***************'
print 'the number of figures that predict right: ',count1
print 'the accuary is :',count1/len(featMatTrain)
count2 = 0.0
for i in range(len(featMatTest)):
    if labelVecPredict2[i] == labelVecTest[i]:
        count2 = count2 + 1
print '************ the result to predicting testing set ************'
print 'the number of figures that predict right:',count2
print 'the  accuary is:',count2/len(featMatTest)