+ 1

Why am I unable to import PIL in python?

I am trying to do following things: >> import PIL >> from PIL import Image >> import Pillow But nothing is working! Is there a way to use PIL module in sololearn?

4th Dec 2022, 11:35 AM
Alfa
Alfa - avatar
4 Answers
+ 6
You can pip install some external libraries on the Sololearn playground, as long as it takes a very short time and the total execution time does not exceed the limit. This way you can use Pillow. Examples: https://code.sololearn.com/cA09A17a2455/?ref=app https://code.sololearn.com/c5a19A1781a1/?ref=app
4th Dec 2022, 2:07 PM
Tibor Santa
Tibor Santa - avatar
+ 2
Not in sololern. If you are using a more professional development environment, you will first need to install the saw on your PC. On the Windows command line write: pip install pil Then you can import it into your project. I have not worked with this library before, so I could make a mistake. I advise you to look at the official documentation
4th Dec 2022, 11:44 AM
</CODER>
</CODER> - avatar
+ 1
Unfortunately sololern doesn't support most python libraries.
4th Dec 2022, 11:53 AM
</CODER>
</CODER> - avatar
+ 1
Thanks Tibor Santa... It worked for me.
4th Dec 2022, 2:33 PM
Alfa
Alfa - avatar