Search code examples
pythonvisual-studioazureptvs

PTVS using os.system fails


I am having an issue with Visual Studio. I have everything set up in my project in the Python Environments including Platformio, which I would like to use.

When I do os.system("platformio init") it fails and produces this error:

'platformio' is not recognized as an internal or external command, operable program or batch file.

I added the platformio folder in the python library Search Paths, but still no success.

I do not have python or platformio installed on the local machine, only in the PTVS. The python program works fine without installing it on the local machine, so I would like to maintain it that way if possible.

Please anyone, help!


Solution

  • After adding the PATH environment variable, all I needed to do was close Visual Studio and open it again. For anyone who struggled with the same issue, just close the programme and it might work!