getpass.getpass() function in Python not working?
For PyCharm 2018.3 Go to 'Edit Configurations' and then select 'Emulate terminal in output console'.
Answer provided by Abhyudaya Sharma
The problem you have is that you are launching it via PyCharm, which has it's own console (and is not the console used by getpass
)
Running the code via a command prompt should work