这是我的代码:
from skimage import io,color
filename = io.imread("input00.jpg")
img = color.rgb2gray(filename,as_grey=True)
io.imshow(img)
io.show()
在第 2 行抛出错误说:
AttributeError: 'builtin_function_or_method' object has no attribute 'iterkeys'
追溯:
Traceback (most recent call last):
File "readImg.py", line 2, in <module>
filename = io.imread("input00.jpg")
File "/Library/Python/2.7/site-packages/skimage/io/_io.py", line 97, in imread
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
File "/Library/Python/2.7/site-packages/skimage/io/manage_plugins.py", line 209, in call_plugin
return func(*args, **kwargs)
File "/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9- intel.egg/matplotlib/pyplot.py", line 2198, in imread
return _imread(*args, **kwargs)
File "/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.9-intel.egg/matplotlib/image.py", line 1249, in imread
'more images' % list(six.iterkeys(handlers.keys)))
File "/Library/Python/2.7/site-packages/six-1.7.2-py2.7.egg/six.py", line 547, in iterkeys
return iter(d.iterkeys(**kw))
AttributeError: 'builtin_function_or_method' object has no attribute 'iterkeys'