2017-08-16 24 views
1

我試圖使用命令python3 manage.py startapp webapp創建應用程序,但我得到一個錯誤,指出:下載sqlite3的在virtualenv中

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

所以我試圖用pip install sqlite3安裝sqlite3的,但我得到這個錯誤:

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/

我試圖運行這個命令:sudo apt install sqlite3但它說,須藤是不是一個有效的命令,甚至容易是不是出於某種原因。我正在運行Python3.6.2。我在我的Godaddy主機上安裝了Python,並且使用SSH來安裝所有內容。我安裝了Python並設置了virtualenv。之後,我安裝了Django並創建了一個Django項目。我如何解決這些錯誤,以成功創建一個Django應用程序?

+0

'pip'或'pip3'? – eyllanesc

+0

你如何安裝Django?當我安裝Django與PIP我不需要因爲Python默認帶它安裝sqlite的。 – eyllanesc

+0

@eyllanesc我do pip – user2896120

回答

1

sqlite3是標準庫的一部分。您不必安裝它。

如果它給你一個錯誤,你可能需要用sudo apt-get install python-dev安裝你的發行版的蟒蛇-dev的軟件包,例如。

+0

It說sudo是一個無法識別的命令 – user2896120