Solution for Git Bash commands stop working after a while (“command not found”) in Pycharm
is Given Below:
I’m using Pycharm Pro for a Flask project on Windows 10.
I’m using Git Bash internally to Pycharm and globally as well. My global Git Bash works totally fine, no weird “command not found”.
The Git Bash terminal internal to Pycharm initially works fine when I open a new instance of the terminal, however after I run my Flask script on
localhost, it starts throwing “command not found” for everything.
Even if I type
python3, it says “command not found”. Same for
cd, etc…nothing works anymore.
During that time, my global Git Bash still works totally fine. In Pycharm, if I close the faulty terminal and open a new instance, everything works fine again.
EDIT: It seems to happen after I
source activate my venv environment.
Try installing python or python3 in proper way in your virtual environment and resolve all the dependencies accordingly. For installation make sure to activate your venv and run the shell as an administrator.