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?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

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.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Does "import xlrd" work in Thonny? cnutakor 3 379 Apr-30-2020, 12:41 AM
Last Post: Larz60+
  import scalalib package doesn't work manu_brighter 2 393 Apr-17-2020, 06:36 PM
Last Post: snippsat
  [split] import PIL dont work vedansh 1 280 Mar-29-2020, 10:00 AM
Last Post: Larz60+
  Tests are not running .Dont why shankar 3 3,282 Sep-20-2018, 07:06 AM
Last Post: shankar
  Import Requests Does not Work DiceMann 12 15,362 Apr-24-2018, 02:45 AM
Last Post: DiceMann
  Code dont work FrankWhite 11 2,317 Mar-31-2018, 09:07 PM
Last Post: FrankWhite
  Dont know How papampi 2 1,455 Oct-23-2017, 04:35 PM
Last Post: papampi

Forum Jump:


Users browsing this thread: 1 Guest(s)