Chuan Chuan Law

DevOps | Software Automation | Continuous Integration

Category: Python

Pip Upgrade Fails – owned by OS

Solution:

hash -d pip

followed by:

type pip

Python: ImportError: /usr/local/lib/python2.7/lib-dynload/_io.so: undefined symbol: PyUnicodeUCS2_Replace

The above error might occur if you have compiled and installed Python from source on Ubuntu.

curl https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz -o python.tgz

tar -xvzf python.tgz

cd Python-2.7.6/

./configure

make

make install

 

The error can be fixed by

./configure –enable-unicode=ucs4

© 2020 Chuan Chuan Law

Theme by Anders NorenUp ↑