Live data from Hacker News

Pyenv – lets you easily switch between multiple versions of Python

github.com

11–20 of 341 posts

Re: Pyenv – lets you easily switch between multiple versions of Python

#12

I have to warn again users that think they have found the silver bullet that pyenv comes with a big caveat: it compiles python on your machine. The number of possible modes of failure in this situation is huge. See also: "Why not tell people to "simply" use pyenv, poetry or anaconda" https://www.bitecode.dev/p/why-not-tell-people-to-simply-use I'm not saying pyenv is not a useful tool, but it is not a tool for beginn…

> it compiles python on your machine

What is the alternative? Every solution that I know of on Linux requires you to build Python on the machine: asdf, official Python downloads, etc.

Re: Pyenv – lets you easily switch between multiple versions of Python

#13
post #2

Is anyone is the AI/ML area finding success with anything other than conda, where installation of CUDA/CUDnn is required? Although I often have to pip install a lot of packages, I find conda's nvidia/pytorch/conda-forge channels are still by far the easiest way to get a deep learning stack up and running, and so I just stick with conda environments. I've tried poetry in the past but getting the NVidia deep learning s…

I use pipenv and I've found it to be much more usable than conda. For my use cases, it's generally faster and I've run into fewer dependency issues.

Re: Pyenv – lets you easily switch between multiple versions of Python

#14
post #2

Is anyone is the AI/ML area finding success with anything other than conda, where installation of CUDA/CUDnn is required? Although I often have to pip install a lot of packages, I find conda's nvidia/pytorch/conda-forge channels are still by far the easiest way to get a deep learning stack up and running, and so I just stick with conda environments. I've tried poetry in the past but getting the NVidia deep learning s…

I love poetry but have found it pretty hard once you move off of anything that doesn’t manage to get wheels on pypi.

We make extensive use of conda/mamba to solve this, and are pretty happy with it, especially with conda-forge.

Re: Pyenv – lets you easily switch between multiple versions of Python

#15
post #11

I thought the recommended approach these days was to use the venv package built in to python3 with `python3 -mvenv ...`

You're right, but venv requires an existing Python install to create a venv. Pyenv is for installing multiple different versions of Python to create those virtual environments.

Re: Pyenv – lets you easily switch between multiple versions of Python

#16
post #11

I thought the recommended approach these days was to use the venv package built in to python3 with `python3 -mvenv ...`

It is, but the problem with `venv` is that it can only use the same version of Python that you're using. E.g. if your Python installation is 3.8, your `venv` will also use 3.8.

Pyenv allows you to use whatever version of Python you want.

Re: Pyenv – lets you easily switch between multiple versions of Python

#19
post #12

I have to warn again users that think they have found the silver bullet that pyenv comes with a big caveat: it compiles python on your machine. The number of possible modes of failure in this situation is huge. See also: "Why not tell people to "simply" use pyenv, poetry or anaconda" https://www.bitecode.dev/p/why-not-tell-people-to-simply-use I'm not saying pyenv is not a useful tool, but it is not a tool for beginn…

> it compiles python on your machine What is the alternative? Every solution that I know of on Linux requires you to build Python on the machine: asdf, official Python downloads, etc.

Rye downloads pre-built binaries.

I'll leave further discussion of the reliability and provenance of said binaries to someone else.

Re: Pyenv – lets you easily switch between multiple versions of Python

#20
post #12

I have to warn again users that think they have found the silver bullet that pyenv comes with a big caveat: it compiles python on your machine. The number of possible modes of failure in this situation is huge. See also: "Why not tell people to "simply" use pyenv, poetry or anaconda" https://www.bitecode.dev/p/why-not-tell-people-to-simply-use I'm not saying pyenv is not a useful tool, but it is not a tool for beginn…

> it compiles python on your machine What is the alternative? Every solution that I know of on Linux requires you to build Python on the machine: asdf, official Python downloads, etc.

> What is the alternative?

Using per-distro official installation channels.

E.g. using deadsnakes PPA on Ubuntu, AUR on Arch Linux, etc.

Post reply on HN