undefined symbol: PyUnicodeUCS2_Decode whilst trying to install psycopg2

前端 未结 4 1179
清歌不尽
清歌不尽 2020-12-18 09:15

I\'m getting an error whilst trying to install psycopg2 on ubuntu 9.10 64 bit.

The error is:

>>> import psycopg2
Traceback (most recent call         


        
4条回答
  •  忘掉有多难
    2020-12-18 09:17

    I had the same error when importing bx.intervals from bx-python:

    undefined symbol: PyUnicodeUCS2_Decode
    

    However, the python version I was using was already compiled with ucs4. Apparently, bx-python was built against a python version that was compiled with ucs2. So I had to recompile python in the opposite way described by the OP: ./configure --enable-unicode=ucs2.

提交回复
热议问题