Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t使用Sqlite命令bash在Python中打开Sqlite db create_Python_Sqlite - Fatal编程技术网

Can';t使用Sqlite命令bash在Python中打开Sqlite db create

Can';t使用Sqlite命令bash在Python中打开Sqlite db create,python,sqlite,Python,Sqlite,因此,如果我使用sqlite3包在Python中创建db: import sqlite3 con = sqlite3.connect('test.db') 我无法在bash中使用sqlite命令行打开数据库: sqlite test.db Unable to open database "test": file is encrypted or is not a database 但是,我可以在Python中使用sqlite3连接到使用sqlite命令行创建的db 如何在sqlite命令行中打

因此,如果我使用sqlite3包在Python中创建db:

import sqlite3
con = sqlite3.connect('test.db')
我无法在bash中使用sqlite命令行打开数据库:

sqlite test.db
Unable to open database "test": file is encrypted or is not a database
但是,我可以在Python中使用sqlite3连接到使用sqlite命令行创建的db


如何在sqlite命令行中打开Python创建的数据库?

安装
sqlite3
并在bash中使用
sqlite3 test.db

您读过以下文章吗:关于版本不匹配或关于密码问题?