I have followed guide: https://esphome.io/guides/getting_started_command_line.html
You will need working python environment in your system, if not installed yet you can follow steps described here https://docs.platformio.org/en/latest/faq.html#faq-install-python
Good luck!