Django - No module named _sqlite3

前端 未结 9 1674

I have django 1.4 installed on my rhel 5. By default rhel 5 has python 2.4 in it but to use django 1.4 I manually installed python 2.7.3 The development server is running fine b

9条回答
  •  眼角桃花
    2021-02-12 13:15

    I got very similar error message when I tried to run the Django development server:

    ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): dlopen(/Users/Rubinous/Projects/Jiiri2/jiiri_venv/lib/python2.7/lib-dynload/_sqlite3.so, 2): Library not loaded: /usr/local/opt/sqlite/lib/libsqlite3.0.8.6.dylib
    Referenced from: /Users/Rubinous/Projects/Jiiri2/jiiri_venv/lib/python2.7/lib-dynload/_sqlite3.so
    Reason: image not found
    

    I solved this by installing pysqlite Python module with pip install pysqlite.

提交回复
热议问题