Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In your example, how did you install python 3.10 and 3.11? That's part of what pyenv solves for you.


Dont't most linux distros have separate packages for most recent python major versions, so that they can't installed in parallel?


For most major distros, the oldest version of Python that they ship is usually the one that's used by other packages that depend on Python. It's not uncommon - especially for libraries - to need testing on something older.


Nix has every maintained python version, so does Arch User Repository, and those can definitely be in parallel.


it's very easy to install them, probably easier than learning pyenv but I have not tried. I just want to use the default settings as much as possible, they're guaranteed to stay as long as python is alive and typically have less surprises for me on daily coding.


Whether it's easy or not depends on the OS you're working on. On Windows, it's just another executable installer, so it's trivial. On macOS, the official installers are terrible (they have no uninstaller), so you want another way. On Linux etc., some distros have only one Python version in the repos, some have two or three, but the latest versions of all reasonable distros won't let you install Python 3.4.


> probably easier than learning pyenv

Yeah “pyenv install 3.10.8” is basically rocket surgery, near impossible to learn.


Install a python version on your system:

    $ pyenv install 3.11-dev (or use pyenv install --list to show list all available versions to install)
Use it in your current shell:

    $ pyenv shell 3.11-dev
Use it in the project directory:

    $ pyenv local 3.11-dev
Use it as the global default:

    $ pyenv global 3.11-dev
All of the mentioned commands can be called with no arguments to show the current python version for the context.

There you go, now you know pyenv. Call it with no arguments to show the other possible commands.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: