Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
    import _crypt
ModuleNotFoundError: No module named '_crypt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\Learnbay deployment\deployment\main.py", line 2, in <module>
    from crypt import methods
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\crypt.py", line 9, in <module>
    raise ImportError("The crypt module is not supported on Windows")
ImportError: The crypt module is not supported on Windows


What I have tried:

Installing module
Renaming it to _crypt
Posted
Updated 22-Sep-22 8:08am
Comments
Richard MacCutchan 22-Sep-22 13:57pm    
The final error message gives you all the information you need.

1 solution

Read the error message, it's really clear:
The crypt module is not supported on Windows

It's Linux specific, very simple, and not compatible with modern systems such as SHA (or even the broken MD5!).

Think about exactly what you are trying to do, and then start working out what you need to do. Only if you have to be compatible with ancient systems do you need to use anything like crypt - and in which case, good luck finding something for Windows apps! I think you will probably need it ...
 
Share this answer
 
Comments
CPallini 23-Sep-22 3:08am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900