ImportError: No module named '_sqlite3' in Python ist3.3
sqlite3 Fehler
import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.3/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.3/sqlite3/dbapi2.py", line 26, in <module>
from _sqlite3 import *
ImportError: No module named '_sqlite3'
ich nutze sqlite3 installieren-Befehl
pip install pysqlite
Downloading/unpacking pysqlite
Downloading pysqlite-2.6.3.tar.gz (76kB): 76kB downloaded
Running setup.py egg_info for package pysqlite
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/usr/local/lib/python3.3/codecs.py", line 300, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 98: invalid continuation byte
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/usr/local/lib/python3.3/codecs.py", line 300, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 98: invalid continuation byte
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/pysqlite
Storing complete log in /root/.pip/pip.log
- Sie haben libsqlite3-dev installiert?
- Versuchen Sie zu importieren, die außerhalb von django. Was passiert?
- ja bereits installiert libsqlite3-dev
- python manage.py syncdb Traceback (most recent call last): File "/usr/local/lib/python3.3/site-packages/django/db/backends/sqlite3/base.py", line 29, in <module>
- Kann ich nicht beantworten :((( ich habe nicht genug Platz :((
- Welche Plattform? Sie haben sqlite3 anderweitig installiert werden, sagen mit homebrew oder apt?
Du musst angemeldet sein, um einen Kommentar abzugeben.
Ich bin ein Fedora 20 Benutzer. Um dieses Problem zu lösen:
Installieren sqlite-devel-Paket mit:
Nach der Installation,python neu kompilieren aus dem source:
Mehrere Versionen von Python, verwenden Sie
altinstall
stattinstall
.find /*/python*/conf*
aber nichts gefunden.Ich denke, es muss Sie nicht installieren, sqlite3,die Sie tun können, wie diese
dann werden Sie finden die sqlite3
Für Python ist3 in Ubuntu:
sudo apt-get install libsqlite3-dev
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
(ersetzen Sie die Versionsnummer, indem Sie Ihre Python ist3 version)tar -xf Python-3.6.3.tar.xz
cd Python-3.6.3/
./configure --enable-loadable-sqlite-extensions && make && sudo make install
finden: https://github.com/sloria/TextBlob/issues/173
Dem kompilieren Paket ist kurz,von etwas, Sie verwenden sollten, zu yum
installieren Sie diese 5 und dann neu kompilieren und installieren Python ist3
und anschließend neu kompilieren Sie den Python ist3
Berührte ich dieses problem in der Verwendung kompiliert 3.5.7
Lösung:
yum install sqlite-devel