[Python] Ubuntu won't recognize updated version of Python with pyenv

Discussão em 'Python' iniciado por Stack, Julho 15, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to update from Python 2.7.17 to 3.8.1 so that I can run pip install pandas. I have installed pyenv, followed the instructions to add pyenv to my path, and installed 3.8.1. But every time I run python, it will not use version 3.8.1.

    Running pyenv version returns 3.8.1, running python -V returns 2.7.17. Similarly, running python runs 2.7.17, and when I type python3 it runs Python 3.7.6?! But if I run pyenv global 3.7.6, the terminal tells me that 3.7.6 isn't installed!

    I have also run pyenv global 3.8.1 in attempt to switch from 2.7.17 so 3.8.1, but it still defaults to 2.7.17 when I type python.

    I am using Ubuntu on Windows 10, if that helps.

    How can I fix this?

    Continue reading...

Compartilhe esta Página