import PIL dont work - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: import PIL dont work (/thread-23770.html) Pages:
1
2
|
import PIL dont work - rodink - Jan-16-2020 hello, I am trying out PIL for the first time but I cannot add / download it. Can someone help me with this? I use pycharm for programming. this is the code i tried: import PIL from PIL import Image, ImageTK RE: import PIL dont work - buran - Jan-16-2020 did you install Pillow? RE: import PIL dont work - rodink - Jan-16-2020 (Jan-16-2020, 02:51 PM)buran Wrote: did you install Pillow? i think i did python -m pip install Pillow Requirement already satisfied: Pillow in c:\python\python38\lib\site-packages (7.0.0) RE: import PIL dont work - buran - Jan-16-2020 it's Pillow, with capital P using pip: pip install Pillow
RE: import PIL dont work - rodink - Jan-16-2020 (Jan-16-2020, 03:00 PM)buran Wrote: it's Pillow, with capital P Same result pip install Pillow Requirement already satisfied: Pillow in c:\python\python38\lib\site-packages (7.0.0) RE: import PIL dont work - buran - Jan-16-2020 OK, it's now installed and you should be able to import it (in your code in Pycharm or other IDE). If you have multiple python installations, make sure that the correct one is set as interpreter in pycharm settings RE: import PIL dont work - rodink - Jan-16-2020 (Jan-16-2020, 03:10 PM)buran Wrote: OK, it's now installed and you should be able to import it (in your code in Pycharm or other IDE). Collecting PIL Could not find a version that satisfies the requirement PIL (from versions: ) No matching distribution found for PIL it did not work RE: import PIL dont work - buran - Jan-16-2020 Hm, I don't understand what you are doing: (Jan-16-2020, 02:59 PM)rodink Wrote: i think i did (Jan-16-2020, 03:04 PM)rodink Wrote: pip install Pillow Pillow is already installed for you python3.8 installation at c:\python\python38\ Now you should be able to do in Pycharm: import PIL from PIL import Image, ImageTKgiven that python3.8 (c:\python\python38\) is set as default interpreter for the project Note that Pillow is friendly fork of PIL and replaced it long time ago. RE: import PIL dont work - rodink - Jan-16-2020 (Jan-16-2020, 03:22 PM)buran Wrote: Hm, I don't understand what you are doing: i just put this in my code: import PIL from PIL import Image, ImageTKit give me this error: ModuleNotFoundError: No module named 'PIL' RE: import PIL dont work - buran - Jan-16-2020 Read https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html and setup the interpreter for the project to be python3.8 with Pillow installed |