Skip to content Skip to sidebar Skip to footer

Importerror: No Module Named Pil When Opening The .py File Directly In Windows

This is a rather complicated problem. My Python script uses the module PIL which is loaded by: from PIL import ImageTk, Image The script works fine in the IDE and also when I star

Solution 1:

Turns out the double-click was indeed using a different interpreter. The double click used the 32-bit python version in Program Files (x86) whereas opening it via command line by typing in python script.py used the 64-bit python version in the Anaconda installation directory. Apparently I had installed python from python.org, then had forgotten all about it and installed Anaconda. Changing the file associations fixed the issue, thank you for your help guys.


Post a Comment for "Importerror: No Module Named Pil When Opening The .py File Directly In Windows"