undefined symbol: PyUnicodeUCS4_AsLatin1String when installing Pillow for local Python

我的梦境 提交于 2019-12-13 15:15:01

问题


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.

  1. How can I let pip use my local python v2.7.8 to install Pillow instead of using the system default python?
  2. How to make Pillow that is built for UCS2 instead of UCS4?
  3. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!