0

I can't import image in tkinter anyone can help me??.....after running this code this kind of error occur "no module name PIL"

From tkinter import * Import tkinter as tk From PIL import Image to, Image root = tk.Tk() img = ImageTk.PhotoImage(Image.open(path)) panel = tk.Label(root, image = img) panel.pack(side = "bottom", fill = "both", expand ="yes") root.mainloop()

2nd Jan 2020, 5:12 PM
Sushmita Khadka
Sushmita Khadka - avatar
14 Respostas
+ 1
pip install pillow
2nd Jan 2020, 5:28 PM
Anirudh Sharma
Anirudh Sharma - avatar
+ 1
Really? Then try to get some info at pillow s website
2nd Jan 2020, 5:30 PM
Anirudh Sharma
Anirudh Sharma - avatar
+ 1
Try: pip install pillow --no-cache-dir
2nd Jan 2020, 5:33 PM
Anirudh Sharma
Anirudh Sharma - avatar
+ 1
What error out gave?
2nd Jan 2020, 5:50 PM
Anirudh Sharma
Anirudh Sharma - avatar
+ 1
Try degrading you pip to 6.2.0
2nd Jan 2020, 5:51 PM
Anirudh Sharma
Anirudh Sharma - avatar
0
My python version is 3.8 so......it's not downloading
2nd Jan 2020, 5:30 PM
Sushmita Khadka
Sushmita Khadka - avatar
0
No it's not working
2nd Jan 2020, 5:49 PM
Sushmita Khadka
Sushmita Khadka - avatar
0
Again no working couldn't find a version that satisfied the requirement 6.2.0 is the error
2nd Jan 2020, 6:02 PM
Sushmita Khadka
Sushmita Khadka - avatar
0
Not***
2nd Jan 2020, 6:02 PM
Sushmita Khadka
Sushmita Khadka - avatar
0
pip install pillow --no-cache-dir Collecting pillow Downloading https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz (37.7MB) |████████████████████████████████| 37.7MB 3.3MB/s Installing collected packages: pillow Running setup.py install for pillow ... error ERROR: Command errored out with exit status 1: command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\roy\\AppData\\Local\\Temp\\pip-install-lmfy2vgl\\pillow\\setup.py'"'"'; __file__='"'"'C:\\Users\\roy\\AppData\\Local\\Temp\\pip-install-lmfy2vgl\\pillow\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\roy\AppData\Local\Temp\pip-record-sj5st7e8\install-record.txt' --single-version-externally-managed --compile cwd: C:\Users\roy\AppData\Local\Temp\pip-install-lmfy2vgl\pillow\ Complet
2nd Jan 2020, 6:06 PM
Sushmita Khadka
Sushmita Khadka - avatar
0
Error
2nd Jan 2020, 6:07 PM
Sushmita Khadka
Sushmita Khadka - avatar
0
Do you use intellij? It can help a lot.... Anyway try Python 3.7. Either 3.8 is incompatible with current releases of pillow, or there is some problem with ya system.....
2nd Jan 2020, 6:25 PM
Anirudh Sharma
Anirudh Sharma - avatar
0
I have no idea about intellij????
2nd Jan 2020, 6:27 PM
Sushmita Khadka
Sushmita Khadka - avatar
0
It's an ide to code in Python. Just write the input statement and let intellij itself download the required libraries
2nd Jan 2020, 6:31 PM
Anirudh Sharma
Anirudh Sharma - avatar