Python导入sqlite3模块失败解决方法

Python版本:3.7.3

导入sqlite3报错信息如下

import sqlite3
Traceback (most recent call last):
  File "", line 1, in
  File "D:\PyCharm Community Edition 2019.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "D:\Miniconda3\envs\jtock\lib\sqlite3\__init__.py", line 23, in
    from sqlite3.dbapi2 import *
  File "D:\PyCharm Community Edition 2019.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "D:\Miniconda3\envs\jtock\lib\sqlite3\dbapi2.py", line 27, in
    from _sqlite3 import *
  File "D:\PyCharm Community Edition 2019.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: 找不到指定的程序。

解决方法:

1. 从(https://www.sqlite.org/download.html )下载sqlite-dll-win32-x86-3070900.zip文件

2. 解压文件,复制到Python安装路径DLLs文件夹下

你可能感兴趣的:(Python导入sqlite3模块失败解决方法)