Python 3.13

ModuleNotFoundError: No module named 'crypt'

ModuleNotFoundError: No module named 'crypt'

What it means

The crypt module was removed in Python 3.13 (PEP 594).

Why it happens

crypt (Unix password hashing) was deprecated in 3.11 and removed in 3.13. Code that hashed or verified system-style passwords with crypt.crypt breaks on a python3.13 runtime.

How to fix it

  1. For new hashing, use a dedicated library (`passlib`, `bcrypt`, `argon2-cffi`) or `hashlib.scrypt`.
  2. To verify existing crypt(3) hashes, use `passlib.hash` — it implements the sha512_crypt/sha256_crypt schemes crypt produced.
  3. There is no stdlib replacement by design; do not try to reintroduce crypt.
  4. Re-test on Python 3.13.

Related deadline: Lambda Python 3.11 projected create/update restrictions2027-07-31.

Check configured patterns in your project

The free EOLkits scanner processes files in your browser and flags selected related patterns in supported IaC and dependency files. File names and contents are not uploaded; bounded aggregate file and finding counts may be sent. It is not a complete source or AWS-account scan.

Prefer a 10-second check? Paste your config into the free AWS EOL checker. Pasted input is not uploaded; bounded first-party usage events may be sent.

Primary source: https://docs.python.org/3/whatsnew/3.13.html

Inspect the $299 report sample and availability →