Issue
I've been working on a Django project using Pycharm 2019.3, and I've been stuck on this issue for days now. I downloaded the project from a repo and have been working well in it, but the terminal is not working properly, for example, when I type even something like 'python --version', it says Python is not recognized, and the same happens with Pip.
If the terminal doesn't recognize python, even, there are a lot of things I can't do. I know the problem is probably with Pycharm or the terminal itself, because if I type the same on the CMD, it works just fine and recognizes python and pip. The commands work anywhere, and on CMD and PowerShell, just not on the Pycharm terminal. However, I have to use the Pycharm terminal because the project uses a virtual environment, right?
I'm relatively inexperienced, but I think if I use the CMD anywhere else, I'd just not be within the virtual environment, right? I believe I have to install packages and work on the Pycharm terminal, not just anywhere. The python version is 3.6, and I have the environment variables set, otherwise the python command wouldn't be recognized anywhere. Any help to fix this or a workaround would save me a lot of time.
EDIT:
The interpreter is set, and it does appear on the interpreter settings, along with all needed packages for the project.
The virtual environment is also active, as I can see in the pycharm terminal that it displays the path with the format:
(virtual_env_name) project_path>
, which I take as meaning the virtualenv is succesfully activated.
Solution
You have to configure your Pycharm. Go to Run->Edit Configurations->Set the Python interpreter to your virtual env path https://www.jetbrains.com/help/pycharm-edu/configuring-local-python-interpreters.html
Answered By - Yohanna Lisnichuk Answer Checked By - Dawn Plyler (WPSolving Volunteer)