Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 import PIL dont work
#1
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
Quote
#2
did you install Pillow?
Quote
#3
(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)
Quote
#4
it's Pillow, with capital P
using pip:
pip install Pillow
Quote
#5
(Jan-16-2020, 03:00 PM)buran Wrote: it's Pillow, with capital P
using pip:
pip install Pillow

Same result

pip install Pillow
Requirement already satisfied: Pillow in c:\python\python38\lib\site-packages (7.0.0)
Quote
#6
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
Quote
#7
(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).
If you have multiple python installations, make sure that the correct one is set as interpreter in pycharm settings

Collecting PIL

Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL

it did not work
Quote
#8
Hm, I don't understand what you are doing:

(Jan-16-2020, 02:59 PM)rodink Wrote: i think i did
python -m pip install Pillow
Requirement already satisfied: Pillow in c:\python\python38\lib\site-packages (7.0.0)

(Jan-16-2020, 03:04 PM)rodink Wrote: pip install Pillow
Requirement already satisfied: Pillow in c:\python\python38\lib\site-packages (7.0.0)

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, ImageTK
given 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.
Quote
#9
(Jan-16-2020, 03:22 PM)buran Wrote: Hm, I don't understand what you are doing:

(Jan-16-2020, 02:59 PM)rodink Wrote: i think i did
python -m pip install Pillow
Requirement already satisfied: Pillow in c:\python\python38\lib\site-packages (7.0.0)

(Jan-16-2020, 03:04 PM)rodink Wrote: pip install Pillow
Requirement already satisfied: Pillow in c:\python\python38\lib\site-packages (7.0.0)

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, ImageTK
given that python3.8 (c:\python\python38\) is set as default interpreter for the project


i just put this in my code:

import PIL
from PIL import Image, ImageTK
it give me this error:

ModuleNotFoundError: No module named 'PIL'
Quote
#10
Read
https://www.jetbrains.com/help/pycharm/c...reter.html

and setup the interpreter for the project to be python3.8 with Pillow installed
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Import Requests Does not Work DiceMann 12 11,305 Apr-24-2018, 02:45 AM
Last Post: DiceMann
  Code dont work FrankWhite 11 1,736 Mar-31-2018, 09:07 PM
Last Post: FrankWhite
  Dont know How papampi 2 1,140 Oct-23-2017, 04:35 PM
Last Post: papampi

Forum Jump:


Users browsing this thread: 1 Guest(s)