Downloading sqlite3 in virtualenv

爱⌒轻易说出口 提交于 2020-04-16 04:23:40

问题


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?


回答1:


sqlite3 is part of the standard library. You don't have to install it.

If it's giving you an error, you probably need to install your distribution's python-dev packages, eg with sudo apt-get install python-dev.



来源:https://stackoverflow.com/questions/45704177/downloading-sqlite3-in-virtualenv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!