Home > other >  My program can't seem to find the python.exe in my Computer
My program can't seem to find the python.exe in my Computer

Time:11-16

Iv'e tried using my folder that I made in school in my own pc but I can't seem to start it as I am assuming that the path to my python3.9 in school and in my house is not the same place. I write these 2 commands:

.\env\Scripts\activate

python app.py

And then I get this back: No Python at 'C:\Python\Python39\python.exe

I don't understand much in this field because its new to me. If you need another file or something to help me just tell me and I will add it. Thank you for the help.

CodePudding user response:

First, I would make sure you have Python installed. To do this, at a command prompt, just type 'python' and see if you get a current version.

One 1 of 3 things will happen:

  1. enter image description here

You'll see this...meaning that IT IS installed.

  1. Nothing will happen at all, because you don't have it installed.

  2. Windows will automatically open up the Windows Store so that you can download Python to your computer.

Once it is installed, you need to make sure you have Python set as the language in VS Code. enter image description here You can click there and the menu bar at the top will have a drop-down so that you can select Python.

But it just sounds like you need to have Python installed in the first place. But try those things and if that doesn't work, I'll follow up and help get you going.

CodePudding user response:

Ok I found the problem. The path my code is looking for python in is: 'C:\Python\Python39\python.exe'. The real path needed is this: 'C:\Users\vardi\AppData\Local\Programs\Python\Python39\python.exe' I just have 2 users in my pc. how do I set it for that path and not the one its looking for? The python program is in there.

  • Related