1

I get the following error, when I try to use SQLCipher. I'm following a tutorial, which can be found here: https://charlesleifer.com/blog/encrypted-sqlite-databases-with-python-and-sqlcipher/

I copied the first 2 lines which are:

>>> from pysqlcipher3 import dbapi2 as sqlcipher
>>> db = sqlcipher.connect('testing.db')

And I get the following error:

ImportError: cannot import name 'dbapi2' from partially initialized module 'sqlcipher' (most likely due to a circular import) (C:\Users\Vlad\Desktop\Coding\sqlcipher.py)

Does anyone know what it means? And how do I fix it?

  • It could possibly be due to the file name your source code is in. Change it to something else that's not the same as the library name. [Source](https://stackoverflow.com/questions/59762996/how-to-fix-attributeerrorpartially-initialized-module#60677039) – blackbrandt Nov 15 '20 at 15:27
  • I renamed my file, but now it says that pysqlcipher3, doesn't exist. I've done installation steps up to the part with exporting CFLAGS. I don't know know what to do now. I've also installed OpenSSL from its wiki. –  Nov 15 '20 at 15:40
  • I couldn't do the exporting of CFLAGS as my CMD said they were unrecognised and multiple other issues. –  Nov 15 '20 at 15:47

0 Answers0