In the process of trying to run a thrid party github project I got the error despite having installed python3-pycryptodome, on RpiOS Lite bookworm (64) on a Pi 4. That third party github project imports AES exactly like the first line of the first of pycryptodome's own examples on https://www.pycryptodome.org/src/examples, i.e. .
Now, I'm no Python person, but I went through the list of things I could think of, but pip complained about externally managed python, so I dismissed it, and I'm not using any virtual environment afaik.
When I try:
This was the most minimal example I could think of. Same result when I repeat this on Debian 14 forky on a PC.
When I import Cryptodome instead there are no complaints:
What's installed:
Sooo... What have I misunderstood this time? :-)
Code:
No module named 'Crypto'Code:
from Crypto.Cipher import AESNow, I'm no Python person, but I went through the list of things I could think of, but pip complained about externally managed python, so I dismissed it, and I'm not using any virtual environment afaik.
When I try:
Code:
$ python Python 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> from Crypto.Cipher import AESTraceback (most recent call last): File "<stdin>", line 1, in <module>ModuleNotFoundError: No module named 'Crypto'When I import Cryptodome instead there are no complaints:
Code:
$ python Python 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> from Cryptodome.Cipher import AES>>> Code:
$ apt list --installed python\*crypto\*Listing... Donepython3-pycryptodome/oldstable,now 3.11.0+dfsg1-4 arm64 [installed]Statistics: Posted by Levajn — Wed Sep 10, 2025 2:06 pm