Sublime Forum

Linux and Python pyexpat errors

#1

I was running into this on debian testing, basically, hit ctrl+` and try

import pyexpat

And getting an error about pyexpat missing. I tried various ways of linking to /usr/lib/python2.6/ but then I would get “pyexpat.so misses symbol _Py_HashSecret”.

I’m not sure if this is due to a difference in python versions? 2.6.6 bundled with sublimetext, 2.6.8 on the system.

To fix this on debian

sudo apt-get deb-build python2.6

Download python-2.6.6 source and unzip. You want to install to a local prefix and configure unicode for 4 bytes, so for example

./configure --prefix=/home/daniel/Downloads/Python-2.6.6/mypy --enable-unicode=ucs4
make
make install

After that, i copied the mypy/lib/python2.6 directory to <sublime_root>/lib/ with that same folder name, python2.6.

After starting SublimeText2 and try import pyexpat, it works fine. I tried the SuperAnt plugin and it now works as well. Just an FYI from someone in need.

0 Likes