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
Python 3.x 如何使用Python和sqlite加密数据库?_Python 3.x_Sqlite_Pysqlcipher - Fatal编程技术网

Python 3.x 如何使用Python和sqlite加密数据库?

Python 3.x 如何使用Python和sqlite加密数据库?,python-3.x,sqlite,pysqlcipher,Python 3.x,Sqlite,Pysqlcipher,我有一个web应用程序,它使用Flask、python3、sqlite和sqlalchemy,但在部署之前,我想加密数据库的内容。我在谷歌上搜索并阅读到pysqlcipher是一条必经之路(如果这不正确,我很乐意选择另一个选项),但我在第一个关卡上摔倒了: pip3 install pysqlcipher3 Collecting pysqlcipher3 Using cached pysqlcipher3-1.0.2.tar.gz Building wheels for collected

我有一个web应用程序,它使用Flask、python3、sqlite和sqlalchemy,但在部署之前,我想加密数据库的内容。我在谷歌上搜索并阅读到pysqlcipher是一条必经之路(如果这不正确,我很乐意选择另一个选项),但我在第一个关卡上摔倒了:

pip3 install pysqlcipher3
Collecting pysqlcipher3
  Using cached pysqlcipher3-1.0.2.tar.gz
Building wheels for collected packages: pysqlcipher3
  Running setup.py bdist_wheel for pysqlcipher3 ... done
  Running setup.py clean for pysqlcipher3
Failed to build pysqlcipher3
Installing collected packages: pysqlcipher3
  Running setup.py install for pysqlcipher3 ... done
Successfully installed pysqlcipher3
然后在python3中尝试:

Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysqlcipher3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pysqlcipher3'
Python 3.6.1(v3.6.1:69C0DB50505012017年3月21日01:21:04)
[GCC 4.2.1(苹果公司建造5666)(dot 3)]关于达尔文
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>导入pysqlcipher3
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ModuleNotFoundError:没有名为“pysqlcipher3”的模块

我找不到开始学习的说明或简单的例子。有什么想法吗?

网页:没有回答问题。为了使用它,我需要导入它,这是失败的。该网页显示了不同的导入。我不确定你的意思,但如果你说使用pysqlcipher而不使用3,那么它将失败,因为它是用于2.7而不是3。Python3需要pysqlcipher3,并且尝试安装pysqlcipher将导致语法错误shmm,具有不同的构建指令。