'Confusion using pip with specific Python version within pyenv in Ubuntu 20.04

I would like to use a specific python version for a specific project, using Python 3.7.12 and then creating a virtual environment with pipenv in a specific folder.

System's version is 3.8. What I tried to do was:

pyenv global 3.7.12
pip install pipenv

But when I did this, I noticed that the version for which it was installed was for System (python 3.8). When I run python3, the command line also shows 3.8, so the instructions seem to have been oriented to python 3.8 instead of 3.7.12

I'm very confused about all this, any help is appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source