1

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?

Ismael Padilla
  • 5,246
  • 4
  • 23
  • 35
leschtsch
  • 17
  • 4

2 Answers2

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
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