$ curl --version
If you don't have, install the curl using:
$ sudo apt-get install curl
After that install the pyenv using the command:
$curl https://pyenv.run | bash
And after installation update your bashrc adding the lines:
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Finally Reload the bashrc:
$ source ~/.bashrc
I think will work fine after that. If you installed the pyenv before, look up at you bashrc to confirm if you added the lines above and reload the bashrc again.