Reputation: 10033
My Pillow installation is broken system-wide.
Either using my OS X pillow version, or other 'isolated' installations within anaconda environments, I always get the same error, while trying to process images:
AccessInit: hash collision: 22 for both 1 and 1
It used to work in the envs, but after some urllib
installs it broke in the environments also.
I have tried, at the top of my script (to no avail):
import PIL.Image
sys.modules['Image'] = PIL.Image
from PIL import Image
I have already uninstalled an reinstalled Pillow, again to no avail.
my Python:
Python 2.7.14 |Anaconda, Inc.| (default, Oct 5 2017, 02:28:52)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
How can I make it work again?
Upvotes: 0
Views: 83
Reputation: 1039
Your problem is likely that two different Python modules are being imported with the same name - https://web.archive.org/web/20110121072135/https://jaredforsyth.com/blog/2010/apr/28/accessinit-hash-collision-3-both-1-and-1/
Without having access to your installation, it is hard to figure out exactly what is happening, so I would suggest tracking each import. A good start would be to see what is imported.
import sys
sys.modules
That, combined with going into the site-packages directory of your Python install and manually removing packages until you find the problematic package, will hopefully give you a good start.
Upvotes: 0