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

Virtual environments with venv don't answer the python version problem unless you throw another tool into the mix.


uv solves this problem.

  uv venv python3.11
done.


conda and uv do manage python versions for you which is part of their appeal, especially on systems that don't make it super straightforward to install multiple different versions of pre-compiled runtimes because their official OS channel of installing python only offers one version. At least on macos, brew supports a number of recent versions that can be installed simultaneously.


Hmm? My venvs do include the Python version (via symlink to /bin). Don't yours?


If you use something like uv (expanded here: https://news.ycombinator.com/item?id=43904078), I think it does. But if you just do `python -m venv .venv`, you get the specific version you used to create the virtual environment with. Some OSes seem to distribute binaries like `python3.8`, `python3.9` and so on so you could do `python3.8 -m venv .venv` to look one env to a specific version, but a bit of a hassle.


The GP's problem was (apparently) an inability to install the right python version, not an inability to select it.


Conda does! `conda create -n myenv python=3.9`, for example




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

Search: