问题描述
import sqlite3
遇到错误
C:\Users\pnkas\OneDrive\Documents\python\lesson\milestone_2_database\venv\Scripts\python.exe C:/Users/pnkas/OneDrive/Documents/python/lesson/milestone_2_database/app.py
Traceback (most recent call last):
File "C:/Users/pnkas/OneDrive/Documents/python/lesson/milestone_2_database/app.py",line 1,in <module>
import sqlite3
File "C:\Users\pnkas\anaconda3\lib\sqlite3\__init__.py",line 23,in <module>
from sqlite3.dbapi2 import *
File "C:\Users\pnkas\anaconda3\lib\sqlite3\dbapi2.py",line 27,in <module>
from _sqlite3 import *
ImportError: DLL load Failed while importing _sqlite3: The specified module Could not be found.
解决方法
您可以下载sqlite3 dll ...您必须找到系统版本。稍后将其添加到此特定文件夹C:\ Users \ YOURUSER \ Anaconda3 \ DLLs。这基本上取决于安装anaconda的位置,并且可能因用户而异,因此请确保将其添加到正确的文件夹中。