Traceback (most recent call last):
File "", line 1, in
File "D:\pycharm\PyCharm 2020.1.5\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\pycharm\PyCharm 2020.1.5\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/dell/PycharmProjects/AI/test.py", line 3, in
img=io.imread('D:\dog.jpg')
File "D:\anaconda\envs\tf2\lib\site-packages\skimage\io_io.py", line 48, in imread
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
File "D:\anaconda\envs\tf2\lib\site-packages\skimage\io\manage_plugins.py", line 207, in call_plugin
return func(*args, **kwargs)
File "D:\anaconda\envs\tf2\lib\site-packages\skimage\io_plugins\imageio_plugin.py", line 10, in imread
return np.asarray(imageio_imread(*args, **kwargs))
File "D:\anaconda\envs\tf2\lib\site-packages\imageio\core\functions.py", line 265, in imread
reader = read(uri, format, "i", **kwargs)
File "D:\anaconda\envs\tf2\lib\site-packages\imageio\core\functions.py", line 182, in get_reader
"Could not find a format to read the specified file in %s mode" % modename
ValueError: Could not find a format to read the specified file in single-image mode
利用pycharm
编译
from skimage import io
import matplotlib.pyplot as plt
img=io.imread('D:\dog.jpg')
出现这种问题,怎么修改呀?
io.imshow(img)
plt.show()