If your python input not working is not working here is what to do. Before showing you how to solve this I am using python in vs code not with Pycharm or another editor but still, it should work. But before checking your code first should be considered as the first option. Sometimes the problem source may be the python version installed or other reasons to be clear there is an example here.
python input not working vscode
let’s assume you have this code where we are asking someone to fill his name and surname:
The error may come from an old version of python. The same code is giving an error while executed in this online python compiler with the version of V2.7.13
Now, the same code is being compiled in another online python compiler which execute version 3 of python and it working correctly without running into error.
And finally the code is executed using vs code as editor we did not run into error as shown down.The problem may come from the python version installed because I have tried the same in different python compilers with different versions some of them execute the code others could not just show an error.
But if you still have a problem event though you have the latest version of python and also running it in vs code here is how to fix it:
- Go to file in the to left conner
- Click preferences and then settings
- Search for run in terminal and select the box Whether to run code in integrated terminal.
Close vs code and then open it , it will work.