Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

564
Visualizações
Python 3.8: No module named '_sqlite3'

I have a shared hosting machine running Linux and I'm trying to get Python 3.8.3 running on it.

I have Python installed with pyenv and the correct version is globally

$ python --version
Python 3.8.3

In order to get Python working with pyenv, I have added this lines to ~/.bashrc:

export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

export TMPDIR="$HOME/tmp_"

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/shims:$PATH"

When I'm running my python script, I receive the error:

'No module named '_sqlite3'. 

Since I don't have root access, and no apt available, I have installed sqlite3 manually according to this answer.

$ wget http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz
$ tar xvvf sqlite-autoconf-3070900.tar.gz
$ cd sqlite-autoconf-3070900
$ ./configure --prefix=~/tmp_
$ make
$ make install

sqlite3 is working, when I enter sqlite3 into the command line, it's working:

$ sqlite3
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> 

I tried reinstalling Python with pyenv and linking Sqlite3 with the next statement, according to this post, but still Python response is no module '_sqlite3' found.

LDFLAGS="-L/home/wazeli1q/tmp_/tmp_/sqlite/lib" CPPFLAGS="-I/home/wazeli1q/tmp_/tmp_/sqlite/include" pyenv install -v 3.8.3

Last attempt was to install sqlite3 into the .local folder, but that did work eighter:

./configure --prefix=$HOME/.local
make && make install

What is going wrong? Just to make clear: I don't have apt and I don't have sudo rights.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda