问题
I used pip to install Pillow. It indicated successful installation of Pillow. But when in Python (v2.7.8), I entered from PIL import Image
, I got this error:
ImportError: /home/local/python2/lib/python2.7/site-packages/PIL/PIL/_imaging.so: undefined symbol: PyUnicodeUCS4_AsLatin1String
The problem is that I have a local python v2.7.8 install which is for UCS2 with maxunicode
: 65535. But the PIL library was built and installed by the system default Python 2.7.6 version, which is UCS4. I suspect pip invoked the default python, v2.7.6.
- How can I let pip use my local python v2.7.8 to install Pillow instead of using the system default python?
- How to make Pillow that is built for UCS2 instead of UCS4?
- Do I need install a different pip for my local python v2.7.8? Current pip is within /usr/bin/ for the system python.
Thanks a lot!
回答1:
If you are using windows machine try downloading binaries from here download python libraries
Here you have an option to provide to which version of python you are trying to install.
来源:https://stackoverflow.com/questions/26965487/undefined-symbol-pyunicodeucs4-aslatin1string-when-installing-pillow-for-local