ImportError: No module named '_sqlite3' in python3.3

前端 未结 5 1298
囚心锁ツ
囚心锁ツ 2020-11-30 09:15

sqlite3 error

import sqlite3
Traceback (most recent call last):
  File \"\", line 1, in 
  File \"/usr/local/lib/python3.3/sqlite3         


        
5条回答
  •  眼角桃花
    2020-11-30 09:21

    The compile package is short of something,you should use yum to install these 5,and then recompile and install python3

    yum install readline-devel
    yum install tk-devel
    yum install tcl-devel  
    yum install openssl-devel   
    yum install sqlite-devel 
    

    and then recompile the python3

    tar Jxvf  Python-3.5.0.tar.xz
    cd Python-3.5.0
    ./configure --prefix=/usr/local/python3
    make && make install
    

提交回复
热议问题