Django - No module named _sqlite3

前端 未结 9 1641

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:32

    MordicusEtCubitus's answer is correct. Can't upvote you yet as am a newbie.

    Just to add to your answer, on fedora(23) run the following command to install instead.

    sudo dnf install libsqlite3x-devel libsqlite3x
    
    0 讨论(0)
  • 2021-02-12 13:33

    You may also have compiled python by hand with no sqlite development library installed

    So, do

    sudo apt-get install libsqlite3-dev libsqlite3
    

    Then, re-install python

    test by entering

    python
    >>> import sqlite3
    
    0 讨论(0)
  • 2021-02-12 13:33

    On MacOSX 10.9 (Mavericks), I had to run this command:

    CPPFLAGS=-I/usr/local/opt/sqlite/include; LDFLAGS=-L/usr/local/opt/sqlite/lib; pip install pysqlite
    

    I used homebrew to install sqlite3.

    brew update; brew install sqlite
    
    0 讨论(0)
提交回复
热议问题