ImportError:没有名为six的模块[Windows]

时间:2015-09-19 22:25:57

标签: python windows opencv matplotlib

import numpy as np
import cv2
from matplotlib import pyplot as plt

img = cv2.imread('test.jpg',0)       
orb = cv2.ORB()   
kp = orb.detect(img,None) 
kp, des = orb.compute(img, kp)   
img2 = cv2.drawKeypoints(img,kp,color=(0,255,0), flags=0)
plt.imshow(img2),plt.show()

我从https://pypi.python.org/pypi/six下载了六个1.9.0。但我将其复制到“C:\ Python27 \ Lib \ site-packages \ matplotlib”目录。但它不起作用。我收到了错误:

  

ImportError:没有名为six的模块

1 个答案:

答案 0 :(得分:2)

如果配置了pip,则可以运行

$ pip install six

或(对于python 3)

$ pip3 install six