I have been searching for hours and can't find anything so I thought I'd ask here.
So my issue is with PIL and Pillow. I need to use python 2.7 as I'm using SimpleCV which isn't supported in Python 3 yet.
When I try to uninstall PIL using sudo pip uninstall PIL
it outputs: Cannot uninstall requirement PIL, not installed
.
This works for python 3 and allows me to use Pillow using from PIL import Image
. If I try to use import Image
I get an error because it doesn't exist however, for python 2.7 (the version I need to use), both from PIL import Image
and import Image
work making me believe PIL hasn't been uninstalled from python 2.7.
Am I correct in thinking that it hasn't been uninstalled for python 2.7? If so how do I uninstall it? Or is it something else?
Thanks in advance!
PS: Just in case it matters, I'm using a Raspberry Pi.
I suspect you have successfully uninstalled PIL, and that you in fact have Pillow installed. Pillow is installed under the package name PIL. This allows you to swap out Pillow with PIL without having to rewrite any of your code. Pillow is "just" a PIL fork.
You can check if import PIL
actually loads Pillow by doing:
import PIL
print PIL.PILLOW_VERSION
If you have Pillow installed it should output some version. It says 3.3.1 here, but I am using Python3. If you do not have Pillow, but PIL, it should result in an error.
Update : You may now see a warning like :
<stdin>:1: DeprecationWarning: PILLOW_VERSION is deprecated and will be removed in a future release. Use __version__ instead.
In that case , try running :
print(__PIL.__version__)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With