How to Use Poetry in Python to avoid Dependency Hell

preview_player
Показать описание

Today, let's discuss Python dependency, virtual environments and the use of Poetry, an all-in-one tool for virtual environments, dependency management, packaging, and distribution in Python projects.

I'll explain how Poetry helps manage dependencies, set up virtual environments, and package projects for distribution.

I'll also mention the limitations of Poetry when dealing with non-Python dependencies or C-based dependencies, recommending the use of containers in such cases.

📒 Links 📒
Article version of this tutorial:
Python Poetry Website

📒 About Earthly 📒
Earthly is a command line tool that simplifies build processes, especially for complex projects involving multiple programming languages. It helps manage communication between different languages, making builds easier to manage. If you want to streamline your build processes and work with multiple languages, Earthly can help.

Рекомендации по теме
Комментарии
Автор

The ADAM GORDON BELL from the CoRecursive podcast!!! DAMNNNN..
Love your podcasts Adam. Thanks for giving back to the community! Instant sub!

yashashav_dk
Автор

The explanation of Poetry and comparing it with other virtual environments has been like none I have seen before. Its a wonderful explanation. The only thing I would have liked to see in addition to what you showed was an EXAMPLE where there is a dependency conflict in some modules and how introducing poetry will resolve the issue.

jonron
Автор

this video helped me with 80% of getting there, now I need to look for where to add the hello world code and how to run it

jdavid
Автор

as to future potential topics,
python typing looks not very clear when I write class methods for non-builtin classes. also wondering since which python3.* does this typing has really performance improvements (or "dev acceleration" as IDE use them)

eugeneL_NE
Автор

Thank you for your content. Your contributions to the YouTube Python Hive mind do not go unnoticed.

Sincerely,
A passionate Pythonista

alexv
Автор

Nice. I like the choice of toml - aligns with Rust - my other language.

jeffg
Автор

'poetry' is not recognized as an internal or external command,
operable program or batch file. facing this error

AghilSoi
Автор

'poetry' is not recognized as an internal or external command,
operable program or batch file.

help me with this error

AghilSoi
Автор

At 8:25 what he is actually tell about the git commit ???
I didn't get that, can any one helps me to understand that ??

harshitmishra
Автор

this is one of the best videos on youtube about dependency management in python

kristiannn
Автор

Great video. Can you please do one on Pants build system as well?

hazard_
Автор

Can I install poetry with poetry? Or will it cause an anomaly in the space time continuum?

NamasenITN
Автор

Explanation was nice. But I think you have missed main part of video that is how to avoid dependency hell. Like when installing two packages which use different versions of same depended package is still resulting in error. Which you explained in the earlier section of the video but didn't actually explain if it could be solved or not using peotry.

cerkal
Автор

This happens to me, it was shit I spend whole day trying to work it out I notice the problem is different dependency on different python version ugh

downloadpcgamesdirectlinkb
Автор

1. What if I don't want to publish my package on pypi but use it on my own local machine as a single executable? For example on Windows machine as an .exe file, how can I build this file?
2. And in this video it is not clear, how poetry breaks the diamond that you show us at the beginning of your video. What if we need two different version of the same package, for two libraries we need in our project, how poetry breaks the diamond and put two different versions of the same library in venv?

budokan
Автор

I don't know which is worse python or nodejs

BryanChance
Автор

To go one step further - devcontainers are an even better solution. Build once - reproduce on any system.

JevKuznetsov
Автор

Python is supposed to be so clever terse and elegant. If it was an apartment, it would be as spotless as patrick bateman's, but they have such a pile of garbage outside you need a Shai-Hulud to get to the door. Just a little poetry there.

intelligenceservices
Автор

I LOVE this video but please make the Internet a better place and stop referring to directories as "folders". Thumbs up! Also, the term "open source" is totally lame. The proper term is "Free Software".

windowsrefund