bxlab / bx-python

Tools for manipulating biological data, particularly multiple sequence alignments
MIT License
145 stars 53 forks source link

ImportError: undefined symbol: PyUnicodeUCS2_FromStringAndSize #66

Closed prullens closed 4 years ago

prullens commented 4 years ago

I am trying to >>> import bx.intervals in python 2.7.5 which I have installed on a computing clusters. Only >>> import bx runs without any trouble, but >>> import bx.intervals gives me the following error: ImportError: /usr/bin/venv/python2.7/site-packages/bx/intervals/intersection.so: undefined symbol: PyUnicodeUCS2_FromStringAndSize

This Stack thread says I have to recompile python: https://stackoverflow.com/questions/2584198/undefined-symbol-pyunicodeucs2-decode-whilst-trying-to-install-psycopg2/2584554#2584554. I tried that, but without any luck!

prullens commented 4 years ago

The issue was solved! Apparently bx-python was built against a python version that was compiled with ucs2. So to fully enable bx utilities I had to recompile the python version I was using from ucs4 to ucs2. I achieved this through: https://stackoverflow.com/questions/2584198/undefined-symbol-pyunicodeucs2-decode-whilst-trying-to-install-psycopg2/62811981#62811981