I can start python from windows cmd just typing "python", but it doesn't work from pycharm terminal - it writes, that "python" is not internal or external command, executable program, or batch file.
So, os.system('python file.py')
or os.popen('python file.py')
also doesn't work, but I have to start another python program in my project. How can I fix it?
Asked
Active
Viewed 69 times
1

Ismael Padilla
- 5,246
- 4
- 23
- 35

leschtsch
- 17
- 4
2 Answers
0
I think you need to add python to the windows PATH
variable. you can find the instructions here

Javad Bahoosh
- 400
- 1
- 3
- 16
-
1They say they can start python from the windows cmd prompt by writing python, that means it is there in the system variables – theProcrastinator Mar 13 '21 at 09:29
0
I found that there is the sys
module, that has the exexutable
variable, that is the path to python.exe, so I'll use the full path. This solved the problem on my computer, so, I think, this will work on other computers.

leschtsch
- 17
- 4