Problems with using pillow

I have PyCharm 2022 and python 3.9 and pillow was preinstalled and listed under python interpreter as version 2.9.  In the text box labeled Python Interpreter, it has the correct version of python and I have only one version of Python installed.
I typed in the code   from PIL import Image, ImageTk,  when I typed Image the entire line dimmed out.  I didn' try to import an image because I don't think it will work.  Anyone know what is going on here?

 

2 comments
Comment actions Permalink

Hello, 

 

Does the code execution successful? 

Please attach a screenshot of the 

Project Interpreter Settings https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html#interpreter-settings and the script with the error in the editor. 

 

Thank you! 

0
Comment actions Permalink

I did not write any code because the line  from PIP import Image, ImageTk  was grayed out, but when I did write the code to display the image this line became active and and the the image was displayed.  I was surprised it worked but thank you for your help.

0

Please sign in to leave a comment.