0

我是 sqlcipher 新手,我想从 python 脚本访问 sqlcipher 数据库。为此,我需要在我的 Windows 计算机上安装 pysqlcipher3,但是当我这样做时:

pip install pysqlcipher3

我明白了:

Collecting pysqlcipher3
  Using cached pysqlcipher3-1.0.4.tar.gz (102 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pysqlcipher3
  Building wheel for pysqlcipher3 (setup.py) ... done
  WARNING: Legacy build of wheel for 'pysqlcipher3' created no files.
  Command arguments: 'd:\python\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Program Files\\KMSpico\\temp\\pip-install-nan658wo\\pysqlcipher3_0470ec5ef649436e8525126e70042d5e\\setup.py'"'"'; __file__='"'"'C:\\Program Files\\KMSpico\\temp\\pip-install-nan658wo\\pysqlcipher3_0470ec5ef649436e8525126e70042d5e\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Program Files\KMSpico\temp\pip-wheel-6iocsl31'
  Command output: [use --verbose to show]
  Running setup.py clean for pysqlcipher3
Failed to build pysqlcipher3
Installing collected packages: pysqlcipher3
    Running setup.py install for pysqlcipher3 ... done
Successfully installed pysqlcipher3
WARNING: You are using pip version 21.3; however, version 21.3.1 is available.
You should consider upgrading via the 'd:\python\python.exe -m pip install --upgrade pip' command.

它说无法同时构建 pysqlcipher3 并成功安装了 pysqlcipher3,我对此感到困惑..

当我尝试从 python shell 访问 pysqlcipher3 时,我说:

Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> import pysqlcipher3
>>> from pysqlcipher3 import dbapi2 as sqlite
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    from pysqlcipher3 import dbapi2 as sqlite
  File "D:\python\lib\pysqlcipher3\dbapi2.py", line 33, in <module>
    from pysqlcipher3._sqlite3 import *
ModuleNotFoundError: No module named 'pysqlcipher3._sqlite3'
>>> 

我用python3.8试过了。我认为是这样的问题:install pysqlcipher3 windows but I didn't succeed to resolve the problem

有人可以帮助我吗?

4

0 回答 0