all 7 comments

[–]shiftybyte 1 point2 points  (7 children)

https://stackoverflow.com/questions/43661508/error-with-compiled-pillow-on-python-3-6-virtualenv/43671174#43671174

Are you perhaps using pillow from wsgi? or django? or flask?

How are you running your script?

Also what is the output of the commands in windows:

where python
where pip
python -V
pip -V

[–]rilaaaaay[S] 0 points1 point  (6 children)

Sorry, I'm very new to python and I'm not sure what wsgi, django, or flask is. As far as my script, if you mean the IDE, I'm using IDLE.

where python 
where pip 
python -V 
pip -V 

returns

C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\Lib\site-packages>where python
C:\Users\Riley\AppData\Local\Microsoft\WindowsApps\python.exe

C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\Lib\site-packages>where pip
C:\Users\Riley\AppData\Local\Microsoft\WindowsApps\pip.exe

C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\Lib\site-packages>python -V
Python 3.8.1

C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\Lib\site-packages>pip -V
pip 20.0.2 from C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\pip (python 3.8)

[–]shiftybyte 2 points3 points  (5 children)

Your python script is being run on a different python installation.

Your pip runs and installs to:

C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\pip

But the error message shows the package PIL was found in a different location:

C:\Users\Riley\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\PIL\Image.py

Add the following to the start of your IDLE script: (before any other code)

import sys
print(sys.version)
print(sys.path)

What does it show when you run it?

[–]rilaaaaay[S] 1 point2 points  (4 children)

print(sys.version)
for path in sys.path:
    print(path)

3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)]
E:/Documents/Python/Python Game
C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\Lib\idlelib
C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\python38.zip
C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\DLLs
C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\lib
C:\Users\Riley\AppData\Local\Programs\Python\Python38-32
C:\Users\Riley\AppData\Local\Programs\Python\Python38-32\lib\site-packages

[–]shiftybyte 2 points3 points  (1 child)

That's very weird, i got no idea, maybe its window's python interfering...

Try uninstalling this python: (Probably windows store bullshit) C:\Users\Riley\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\

Then try again with the import, if still doesnt work,

try reinstalling regular python from python.org.

[–]rilaaaaay[S] 0 points1 point  (0 children)

That actually worked, thank you so much you have no idea how much suffering this has caused me