Better quickstart guide/opening picture
In my opinion, the core functionality of pyenv is not presented in a concise manner anywhere in the README. The first image in the readme gets lost in the sauce (pypy in 2024?) and the usage section is a huge wall of text.
The minimal demo of pyenv for me would be:
Show 1 currently installed version with pyenv
Install 1 version with pyenv (omit long installation output)
Show 2 versions installed
Switch to that version with pyenv local, run python --version
Switch to another version with pyenv local, run python --version
This feature set of pyenv is amazing, deserves recognition, and to anyone who has struggled with python versions, it's a huge blessing. I just want a way to quickly link to a snippet with those features highlighted, aka a quickstart guide.
Funnily, when I tried to record these steps "pyenv local
@madhu-GG I think this might be because you need some setup code/pyenv init in your ~/.bashrc or ~/.zshrc etc. This, along with the choice to make the user install dependencies, feels really unintuitive in my opinion. Pyenv is not as easy to use as I thought.
@kevinlinxc I do have the recommended incantations in my bashrc. I kind of solved the issue by sourcing my bashrc file before the final two commands. I have a demo gif ready. Let me raise a PR and see what happens.
This looks good?
In my opinion, a gif is not appropriate as the commands take a long time. I like your setup instructions though, they would have helped me a lot while I was struggling to figure out how to use pyenv.
FYI here's the last discussion which raised similar concerns: https://github.com/pyenv/pyenv/issues/1677
@native-api I remain with my position that the readme is extremely bloated, and is ripe for confusion. Although it is a separate issue, things I struggled with include:
- not having the build dependencies to actually install a python version
- pyenv not being init because I didn't add it to my bashrc and source it
- how to actually do the things I mentioned in the original post
All of this information is technically in the README/a linked markdown from the readme, but it's so sparse that it takes several clicks and minutes of reading to figure out.
Funnily, when I tried to record these steps "pyenv local " actually failed to set the version. "pyenv versions" displays the system and my installed version 3.12.5, but when doing "python3 --version" I get the system python3 version 3.10.2
I see the same. I created #3098 to track.