Pyenv and Incompatibility

I use pyenv as a python version manager. When using platformio, even if I have defined python 3.6.7 version with pyenv, platformio run always python2.

It doesn’t happen that issue using the Linux terminal.

Anyone knows how to solve it?

Though I’ve never used pyenv, only the upcoming PlatformIO Core 4 willl support running natively under Python3. It may be partially available in the development version. See Stop Platformio installing python 2.7.13 - #5 by ivankravets and Check docs and add support for Python 3.5+ before release · Issue #1991 · platformio/platformio-core · GitHub.