I'm using django-encrypted-fields to encrypt models in the database, but I'm getting the ModuleNotFoundError: No module named 'errors' from keyczar , is there any solvations?
I got the same ModuleNotFoundError: No module named 'errors'
error when using python-keyczar
.
In my case the error is from ... Python/3.9/lib/python/site-packages/keyczar/keyczar.py, line 26
This fails because the import errors
statement on that line is using an "implicit relative import", which is not supported in python 3. You could fix this specific error by adding the keyczar directory to the PYTHONPATH so python can find this and the other modules that it imports in this way. But the real problem here is that you are using a python 2 module from python 3 and you'll run into other issues after fixing this one, because there are many other incompatibilities between between python 2 and 3.
There is a "python3-keyczar" keyczar module in pip (note the "3"). Using this module with python3 worked for me. So depending on your situation (I know nothing about django) the fix is using either python 2(.7) or uninstalling python-keyczar and installing python3-keyczar.
Note that keyczar is no longer maintained (see: https://github.com/google/keyczar )
python-keyczar
u installed this??
check: pip list
or install
pip install python-keyczar
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.