Downloading sqlite3 in virtualenv

Viewed 6223

I'm trying to create app using the command python3 manage.py startapp webapp but i'm getting an error that says:

django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named '_sqlite3'

So I tried installing sqlite3 using pip install sqlite3 but I got this error:

Using cached sqlite3-99.0.tar.gz

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "", line 1, in

File "/tmp/pip-build-dbz_f1ia/sqlite3/setup.py", line 2, in raise RuntimeError("Package 'sqlite3' must not be downloaded from pypi")

RuntimeError: Package 'sqlite3' must not be downloaded from pypi

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-dbz_f1ia/sqlite3/

I tried running this command: sudo apt install sqlite3 but it says sudo is not a valid command, even apt isn't for some reason. I'm running Python3.6.2. I installed Python on my Godaddy hosting and i'm using SSH to install everything. I installed Python and setup a virtualenv. Afterwards, I installed Django and created a Django project. How can I fix these errors to successfully create a Django app?

2 Answers

as answered by @Daniel Roseman, sqlite3 is part of the standard library since Python v2.5. You don't have to install it.

However, if you have created a virtual environment manually using venv or virtualenv, you would have to copy the sqlite3.dll file directly into the <<environment_name>>\Scripts folder. Worked for me

Related