undefined symbol: PyOS_mystrnicmp

落爺英雄遲暮 提交于 2019-12-25 07:59:16

问题


I tried installing pysqlite, but I'm having some trouble using it.

>>> import pysqlite2.dbapi2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/.pyenv/versions/2.7.5/lib/python2.7/site-packages/pysqlite2/dbapi2.py", line 28, in <module>
    from pysqlite2._sqlite import *
ImportError: /data/.pyenv/versions/2.7.5/lib/python2.7/site-packages/pysqlite2/_sqlite.so: undefined symbol: PyOS_mystrnicmp

I think I might be missing some Python headers. Where do I find them? I'm using CentOS with CPython 2.7.5.


回答1:


As https://groups.google.com/forum/#!topic/python-sqlite/04Ocf7aP1so points out, a bug was reported that appears to be fixed in newer versions of Python. Upgrading to a later version of Python 2.7 did the trick for me.



来源:https://stackoverflow.com/questions/39975712/undefined-symbol-pyos-mystrnicmp

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