How do I change the local project version of pyenv?



  • Also see:
    pyenv help
    How do I install the python multiple version management tool pyenv?

    Create a directory for your python project and change directory to it.

    $ mkdir demo_env
    $ cd demo_env
    

    Before changing the local python version.

    $ pyenv versions
      system
      2.7.15
    * 3.8.5 (set by /home/trainer/demo_env/.python-version)
      3.8-dev
    

    Change the local version of python for specific python project.

    $ pyenv local 3.8-dev
    

    Check the python version being used again.

    $ pyenv versions
      system
      2.7.15
      3.8.5
    * 3.8-dev (set by /home/trainer/demo_env/.python-version)
    

Log in to reply
 

© Lightnetics 2024