Home > other >  Why am I unable to open a picture in python
Why am I unable to open a picture in python

Time:03-05


The [1. JPG] is my project directory under a small picture, when I perform pycharm tip me this error,
How can I solve?

CodePudding user response:

The import matplotlib. Pyplot as PLT
The import matplotlib. Image as mpimg
Img=mpimg. Imread (' 12. JPG)
PLT. Imshow (img)
PLT. Axis (' off ') # does not display the coordinate axis
plt.show()

CodePudding user response:

Your [import matplotlib. Pyplot as PLT] how come of, I also entered has an error underlined
  • Related