Live data from Hacker News

Switching from Pyenv to Uv

bluesock.org

151–160 of 239 posts

Re: Switching from Pyenv to Uv

#151
post #119

Earlier quoted context omitted.

+1 …but we did have to wait for cargo, npm (I include yarn and pnpm here) and maybe golang to blaze the ‘this is how it’s done’ trail. Obvious in hindsight.

Ruby's bundler had already invented the correct model many years ago. It only took time for others to accept that.

Wait, a bundler? What needs to be bundled when using Ruby? Maybe this is not the same meaning as with JS bundlers. And why does a bundles manage dependencies?

Re: Switching from Pyenv to Uv

#152
post #40

Uv really fixes Python. It takes it from "oh god I have to fight Python again" to "wow it was actually fast and easy". I think all the other projects (pyenv, poetry, pip, etc.) should voluntarily retire for the good of Python. If everyone moved to Uv right now, Python would be in a far better place. I'm serious. (It's not going to happen though because the Python community has no taste.) The only very minor issue I'v…

Agree. I mostly do front end in my day job, and despite JavaScript being a bit of a mess lang, dealing with npm is way better than juggling anaconda, miniforge, Poetry, pip, venv, etc depending on the project. UV is such a smooth UX that it makes you wonder how something like it wasn’t part of Python from the start.

Feels like you're doing it wrong if you're dealing with all of those.

Re: Switching from Pyenv to Uv

#153

Earlier quoted context omitted.

Ruby's bundler had already invented the correct model many years ago. It only took time for others to accept that.

Wait, a bundler? What needs to be bundled when using Ruby? Maybe this is not the same meaning as with JS bundlers. And why does a bundles manage dependencies?

It’s what it’s called https://bundler.io/

No sillier than the other various package managers.

Re: Switching from Pyenv to Uv

#155

Maybe this one will finally be adopted as the official package manager for Python? Only 20 years late, but it would be a nice development.

Please not. Python core is suffering from corporate capture and ruins everything it touches.

The PSF would probably dig up some old posts from the uv authors, defame them, take the code and make it worse.

Re: Switching from Pyenv to Uv

#156

Earlier quoted context omitted.

How does this interact with your code editor or IDE? When you edit the file, where does the editor look for information about the imported third-party libraries?

Usually the VENV and import lines are enough

How do you determine where the venv is? AFAIK, uv run in script mode creates the venv in some random temporary directory.

Re: Switching from Pyenv to Uv

#157

I am pretty happy with poetry for near future. I prefer using python interpreters installed by linux package manager. In cloud I use python docker. Poetry recently added option to install python too if I changed my mind. I have already setup CI/CD pipelines for programs and python libraries. Using uv would probably save some time on dependency updates but it would require changing my workflow and CI/CD. I do not thin…

I'm pretty much with you and still trying to figure out why I want to switch away from pyenv+poetry. I get that uv does both, but I'm very happy with pyenv+poetry combo. Old baggage, but I came from the rvm world which attempted to do exactly what uv does, but rvm was an absolute mess in 2013. rbenv+bundler solved so many problems for me and the experience was so bad that when I saw uv my gut reaction was to say "nev…

Uv dependency solving is light years faster than poetry. If you are working on actual projects with many dependencies, poetry is a liability

Re: Switching from Pyenv to Uv

#158
post #119

Earlier quoted context omitted.

+1 …but we did have to wait for cargo, npm (I include yarn and pnpm here) and maybe golang to blaze the ‘this is how it’s done’ trail. Obvious in hindsight.

Ruby's bundler had already invented the correct model many years ago. It only took time for others to accept that.

Yeah, but unlike bundle, uv locks in your Python version and downloads that Python version as needed. It’s like bundle and rbenv combined.

Re: Switching from Pyenv to Uv

#159

Earlier quoted context omitted.

Ruby's bundler had already invented the correct model many years ago. It only took time for others to accept that.

Yeah, but unlike bundle, uv locks in your Python version and downloads that Python version as needed. It’s like bundle and rbenv combined.

Sure. That seems less important to me than the packages. As long as the language version is checked, that’s the important bit.

Re: Switching from Pyenv to Uv

#160
I have been using Python for 20 years, and have been an intermediate to advanced user of it for last 5-7 years. I use it mostly for scientific computing (so lots of Numpy, SciPy, etc.), IoT data processing, and also for some microservices that don’t need to be super fast. I publish and maintain a few packages in PyPI and conda (though I almost never use conda myself), including a C++ library with Python bindings generated by SWIG (SWIG wouldn’t be my first choice, but I inherited it).

In what I’ve done, I’ve never found things like pipenv, let alone uv, to be necessary. Am I missing something? What would uv get?

Post reply on HN