articles/2024/python-poetry-vs-uv/ #15
Replies: 4 comments 7 replies
-
|
I appreciate the article, and I share your sentiment. I don't feel that uv is quite ready to replace poetry in my workflows yet. However, something caught my attention when you were suggesting that you can replace pyenv with uv. I've managed to do this, and there's a step that's very useful for getting poetry to use a python version installed via uv. I do not set a local version of python to create the Instead, I initialize the virtual environment that poetry uses with a python version installed by uv. You can do that with one command using: poetry env use $(uv python find 3.12)You can, of course change the python version to whichever you prefer as long as it's installed on your system and uv can detect it. After that, it's simply a matter of running Cheers! |
Beta Was this translation helpful? Give feedback.
-
|
Dependency groups should now be supported astral-sh/uv#5632 |
Beta Was this translation helpful? Give feedback.
-
|
pyenv isn't slow, it's building the Python distribution from source uv downloads a prebuilt binary, which means you might not get a working python on certain systems This might be a niche but uv won't work on some systems unless they're binary compatible with the python distributions available for download through uv - not sure if they build their own binaries or just download them from somewhere. |
Beta Was this translation helpful? Give feedback.
-
|
Kevin, Great article. I'm a newbie to Python and its build managers, I come from a Java background where we use either Maven or Gradle for build management. One of the downsides with either uv or poetry (not sure) is that the env created is local to a project as a result if multiple projects use similar dependencies they end up having the same copy of dependencies downloaded and installed local to their project folders, This makes them lees re-usable and increases the disk consumption especially if your projects are using tensorflow and pytorch which have a dependencies close to a Gig in size. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
articles/2024/python-poetry-vs-uv/
Comparing two Python package managers: Poetry and new kid on the block uv.
https://www.loopwerk.io/articles/2024/python-poetry-vs-uv/
Beta Was this translation helpful? Give feedback.
All reactions