I have found getpass does not work in PyCharm. It just hangs.
In fact is seems msvcrt.getch and raw_input also don\'t work, so perhaps the issue is not with getpass
Go to 'Edit Configurations' and then select 'Emulate terminal in output console'.