如何在Python中安装sqlite
?
我尝试了pip install pysqlite3
,但它给了我一个错误
your texterror: subprocess-exited-with-error
× Building wheel for pysqlite3 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\pysqlite3
copying pysqlite3\dbapi2.py -> build\lib.win-amd64-cpython-311\pysqlite3
copying pysqlite3\__init__.py -> build\lib.win-amd64-cpython-311\pysqlite3
running build_ext
Builds a C extension linking against libsqlite3 library
building 'pysqlite3._sqlite3' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pysqlite3
Failed to build pysqlite3
ERROR: Could not build wheels for p
ysqlite3, which is required to install pyproject.toml-based projects
字符串
1条答案
按热度按时间guz6ccqo1#
这是因为SQLite是错误的或没有安装在路径中,如果你使用Windows.你可以检查SQLite是否是通过Python运行一个小程序,试图打开或创建一个SQLite数据库在您的PC上工作.
字符串