How to Create and Use Virtual Environments in Python With Poetry

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 209

  • @ArjanCodes
    @ArjanCodes  ปีที่แล้ว +2

    💡 Get my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.

  • @Victorinoeng
    @Victorinoeng ปีที่แล้ว +54

    There are some additional super useful functionally worth mentioning:
    1) In the toml file, there are special characters that define/limit how to update dependencies versions (^, ~);
    2) the lock file “locks” the exact versions for dependencies and transient ones. This ensures reproducibility and is a game changes for production ready code. it is possible to test updating packages and only committing the new .lock file if everything works.
    3) poetry has a cli tool to auto bump the package version (major, minor, patch) which makes it even easier when managing a package
    4) for some compatibility cases, it is also possible to export the dependencies into a requirements.txt file (for example, when using serverless framework to deploy an AWS Lambda function using the pip-requirements plugin)

    • @JobertoDiniz
      @JobertoDiniz 3 หลายเดือนก่อน

      How and when would you use 3? Can you give an example?

    • @Victorinoeng
      @Victorinoeng 3 หลายเดือนก่อน

      Sure thing! When building an automated CI pipeline that bumps the package version and then deploys it (build/publish). This can even be automated based on the commit message standard, such as *semantic versioning*. There is a cool package, commitzen, that really helps!

  • @PaulFWatts
    @PaulFWatts ปีที่แล้ว +35

    I don't think it can be underestimated what a "rabbit hole of pain 🙂" this topic can be for the python programmer who is moving beyond the basics (I know from personal experience lol). Especially compared to `cargo` in Rust. Poetry has simplified my Python development, and this is an excellent video in getting started with it. Thanks for all your great videos!

    • @dr.mikeybee
      @dr.mikeybee ปีที่แล้ว

      I find that the most critical part of installing packages for some repo or another is getting the python version right. Very often if pip install -r fails, it's because you need an older version of python. So delete your virtual environment and recreate it with an older version. I usually use conda, so it's conda create -n python=3.7 or so.

  • @ImARichard
    @ImARichard ปีที่แล้ว +41

    Poetry is a 10/10 project tool IMO. Im glad I was able to convince my team to move over to it.

    • @codingcrashkurse6429
      @codingcrashkurse6429 ปีที่แล้ว

      same here, never look back at setuptools 😀

    • @WouterVandenHove1
      @WouterVandenHove1 ปีที่แล้ว

      Unfortunatelty they are introducing the horrible idea of range-pinning / upper-pinning their abstract dependencies.
      This will create a giant dependency-hell of false positives.

    • @kevon217
      @kevon217 ปีที่แล้ว +1

      It’s been a game changer for me.

    • @zscoder
      @zscoder ปีที่แล้ว +1

      What was your team using before?

  •  ปีที่แล้ว +17

    This has to be one of the best and most concise tutorials I've watched lately. I've been using virtualenvs and venvs with pipfiles for years, but this looks like the next logical step. Thanks!

  • @yash1152
    @yash1152 ปีที่แล้ว +2

    3:04 venv (built-in)

    • @yash1152
      @yash1152 ปีที่แล้ว

      5:13 lock file: yeah conda also uses that. but i dont understand what does that entail practically.

    • @yash1152
      @yash1152 ปีที่แล้ว

      8:20 idky but in default github codespaces (running ubuntu); via python's builtin venv: the .venv dir was actually only 25 MB despite the packages being large 100-200 MB. and also, on rm -r .venv and reinstalling; it didnt download but used from cache.
      I thought maybe the packages are at a global location there.

    • @yash1152
      @yash1152 9 หลายเดือนก่อน

      coming today back to this quick rununp. the extension for reStructuredText lextudio.restructuredtext on vscodium mentions in #409 that
      _"While many ... , Pipenv shows a good enough architecture and a clean way to integrate. However, venv is widely used and part of Python standard."_
      and looking at pipenv's pypi listing, it seems really good: brings _most_ benefits of conda lineage here:
      * manageable as a separate app (via pipx)
      * lock files
      * separate abstract dependency declarations from the last tested combination
      * dependency graph
      * Automatically install required Pythons, if pyenv or asdf is available.
      * Automatically adds/removes packages to a Pipfile when they are installed/uninstalled
      i had tried micromamba¹ (from conda lineage) to install c++ based dlib² package (which₂ doesn't distribute binary .whl on pypi). but it₁ was hard to configure properly, and a bit opaque on where are its things going. there's even no official way to uninstall it lol.

    • @yash1152
      @yash1152 9 หลายเดือนก่อน

      benefits of poetry over pipenv seems that it can be used to:
      4:53 * specify python version, so no need of pyenv?
      5:04 * publish packages, so no need of setuptools? yeah, the build system table here
      5:57 * dev dependencies are mentioned separately :)
      6:57 * get info about project. it is even shows python implementation used, so, it hints that it's compatible with other implementations 😋?
      things to note:
      13:21 python packages using c-extensions (numpy, etc). yeah see, the dlib thing - but yep, i was already aware that this would be issue in any project manager which is python's native.

  • @archibald-yc5le
    @archibald-yc5le ปีที่แล้ว +3

    I've actually been using conda for this, even for non-Python projects, and it worked well for me so far

  • @randomclimber
    @randomclimber ปีที่แล้ว +1

    I'm using pyenv to manage python versions, and then having poetry creating creating a virtual env inside the project. Really glad with this setup.

  • @kerryw6361
    @kerryw6361 ปีที่แล้ว +6

    This is a great video to understand the use of poetry. After this video, I find the official Poetry documentation making a lot of sense. Thank you!!

  • @DevelopXp
    @DevelopXp ปีที่แล้ว +2

    Finally sounds like theres a decent python project package manager. Can’t wait to use it

  • @iliandili
    @iliandili ปีที่แล้ว

    I moved now from 1.7.1 to August 2023 version 1.6.1 and it worked smoothly

  • @ln8416
    @ln8416 4 หลายเดือนก่อน

    Thanks, before watching the video I struggled at quite some points. Now it is very clear to me and I see the advantages of using Poetry :)

  • @caetanog_
    @caetanog_ ปีที่แล้ว

    At work we started using poetry, it helped us a lot to deploy and also manage de dependencies.

  • @cdgarzon1
    @cdgarzon1 ปีที่แล้ว +2

    Good video! I've been using poetry for some time now, and recently ran into the case where you have a poetry project that uses a python version that needs to be updated, which means you have to manage multiple python version in your system and need to tell poetry to go from one version to another. That would be a really good topic for another video as I see a lot of confusing information online about pyenv and poetry working together

  • @loic1665
    @loic1665 ปีที่แล้ว

    Poetry is life! Seriously it's a great tool, at word we use it all the time and for my personal projets I would use it without an hesitation too!

  • @thebrigandier
    @thebrigandier ปีที่แล้ว +7

    That .venv tip can be handy for people using VSCode's dev containers feature. If you need to rebuild the dev container you end up trashing its filesystem usually, along with any Poetry virtualenvs that may have been created in the container filesystem. By using .venv within your repo's source directory (probably want to .gitignore it), you can rebuild the dev container without wiping your venv, saving you from doing poetry install repeatedly.

    • @manuelstausberg8923
      @manuelstausberg8923 ปีที่แล้ว

      You mean mounting the .venv directory into the container?

  • @DarknezRocks
    @DarknezRocks ปีที่แล้ว +7

    Thanks Arjan, was waiting a long time for this video. Finally Poetry gets explained in a good and clear way!

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว +1

      Thank you, glad you liked it!

  • @jindy94
    @jindy94 ปีที่แล้ว +17

    Another great video!! Just a few questions:
    1. Could you share your shell setup? The autocomplete is amazing!!
    2. There doesn't seem to have a seamless way to build the dependencies into a docker and make it as lightweight as compared to building the dependencies through requirements.txt.. How would you suggest going around this problem?

    • @wevertonmarx
      @wevertonmarx ปีที่แล้ว

      You can use poetry export to generate a requirements.txt based on the dependencies in your poetry.lock file

    • @mattiapiccinetti4301
      @mattiapiccinetti4301 ปีที่แล้ว +2

      About the autocomplete: it seems Fig, and you can do some magic AI tricks

    • @Eisesser01
      @Eisesser01 ปีที่แล้ว

      @@mattiapiccinetti4301 Sadly, macOS only right now :(

  • @neobrandsainclair3407
    @neobrandsainclair3407 ปีที่แล้ว +1

    Thanks for the video. If I recall correctly, Poetry also allows to have multiple sets of dependencies, for example a dev set where you put all your tests dependancies (like pytest), and a prod set for the app dependencies.

    • @loic1665
      @loic1665 ปีที่แล้ว +1

      Yes that's right!

  • @blanketfish
    @blanketfish ปีที่แล้ว

    I love poetry + pyenv. It allows me to define the dependencies exactly so that anybody that clones my repo can get the exact experience I get.

  • @UNgineering
    @UNgineering ปีที่แล้ว +5

    2 questions:
    1. which config/plugin/script are you using to provide those neat autocompletions when typing terminal commands?
    2. what is the advantage of poetry over pipenv? they look very similar in functionality (aside from publishing to pypi), and pipenv creates Pipfile, which looks almost identical to pryproject.toml (same with their lockfiles).

    • @wevertonmarx
      @wevertonmarx ปีที่แล้ว +3

      2. I have used Pipenv before and switched to Poetry because it's much faster

    • @bonquaviusdingle5720
      @bonquaviusdingle5720 ปีที่แล้ว +3

      Poetry locks dependencies faster, and clearly explains when there is a dependency conflict.

  • @alansnyder8448
    @alansnyder8448 ปีที่แล้ว +2

    Personally, I've not had much luck with poetry. It isn't deterministic. Sometimes it breaks in bad ways, and this has happened enough in a team environment that I've given up on it completely.
    I'm looking for something other than poetry. Currently just using virtual environments, but I am waiting for the right solution to come along.

  • @johncrunk8038
    @johncrunk8038 ปีที่แล้ว +2

    I have been using pipenv for a couple years. I really like poetry so maybe it's time to learn a new tool. It's actually not that different than pipenv, but cool. Thanks.

    • @tommybrecher7742
      @tommybrecher7742 ปีที่แล้ว

      Yeah I'm fond of pipenv too but it's so slow... 😱

  • @FollowPathfinder
    @FollowPathfinder ปีที่แล้ว +1

    Thank for the video Arjan, I think some medieval emperors would be interested in the practical applications of a language like Python, such as its ability to automate tasks and process large amounts of data. They would appreciate its ability to create visualizations and simulations, which could be useful for military planning or other strategic purposes.

  • @armagaan009
    @armagaan009 9 หลายเดือนก่อน

    Thank you for the video. It is better than Poetry's "Introduction" and "Basic Usage" pages. They are confusing.

    • @ArjanCodes
      @ArjanCodes  9 หลายเดือนก่อน

      I'm glad the video was helpful!

  • @EvanYoung-xo8kd
    @EvanYoung-xo8kd ปีที่แล้ว

    Thanks for this!! I started playing with Poetry a little while ago and needed this video!

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว

      You're so welcome!

  • @davidl3383
    @davidl3383 ปีที่แล้ว

    Thank you son much exactly when I tart learning poetry😊 excellent tips to delete old env and reinstall them evently to limite size of project

  • @NickWindham
    @NickWindham ปีที่แล้ว +1

    I use Pycharm. A main reason is how it creates a new environment for me for each new project. VS Code needs an easier built in feature like Pycharm.

    • @EngineerNick
      @EngineerNick ปีที่แล้ว

      pycharm was my favorite until vscode's pylance started giving better code hints and i got attached to some vscode extensions. But there are many features I miss... the doc-string rendering on hover was much neater in pycharm.

  • @chineduezeofor2481
    @chineduezeofor2481 10 หลายเดือนก่อน +1

    Thank you for making this awesome video.

    • @ArjanCodes
      @ArjanCodes  10 หลายเดือนก่อน

      Glad you enjoyed the video!

  • @pythonsamurai
    @pythonsamurai ปีที่แล้ว +2

    7:04 You can do it by simply writing... (watching in the notes to find the command) ...

  • @hY-ug8vn
    @hY-ug8vn ปีที่แล้ว +1

    you're a champ Arjan

  • @milandean
    @milandean ปีที่แล้ว

    So glad this video finally came out!!

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว +1

      Haha, yes it took me a while :)

  • @BillTheGreek7
    @BillTheGreek7 ปีที่แล้ว +3

    Hello!
    I love your videos!
    Only one thing I would like to point out (in case it happens and you see this comment) is to use a bigger screen? or zoom out a bit?, because it looks really crowded now (watching on PC though)
    Thank you for your content!!

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว +2

      Thanks for the tips!

  • @AISWARYAR-et6rp
    @AISWARYAR-et6rp 2 หลายเดือนก่อน +1

    How should get that toml file

  • @OlliWilkman
    @OlliWilkman ปีที่แล้ว +2

    I used Poetry for a while but switched to PDM lately. It's pretty much the same experience but follows the Python PEP standards a little better (though has to sacrifice the nice version number operators), and I hear the dependency resolver is faster in many cases though that hasn't been an issue for me.

    • @alsonyang230
      @alsonyang230 ปีที่แล้ว

      Hey mate, how's your experience with PDM since then compared to Poetry? I am trying to learn either of the two and saw your comments, hope you could shed some light. I found poetry is more popular (for now) and hence would get more community support. If there is no noticeable difference, I might just pick poetry.

    • @OlliWilkman
      @OlliWilkman ปีที่แล้ว +2

      @@alsonyang230 I still use PDM and I wouldn't go back to Poetry. I'm also just today considering converting an older Poetry project into PDM. But I don't have any very strong recommendation either way. And I'd say that if you learn one, you'll get the hang of the other one fairly quickly if necessary.

    • @alsonyang230
      @alsonyang230 ปีที่แล้ว

      @@OlliWilkman Thanks mate, appreciate your input

  • @samoylov1973
    @samoylov1973 ปีที่แล้ว +2

    Thanks for explaining! But docker looks more preferable to me in such cases. Poetry could be, if it were not as complicated for set up.

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w ปีที่แล้ว

    This was really well explained.

  • @darkjord5823
    @darkjord5823 ปีที่แล้ว +1

    yooo what terminal is that that gives you suggestions like that?

  • @jewpcabra666
    @jewpcabra666 ปีที่แล้ว

    i wish you had talked more about the lock file - that is what always messes me up with poetry!

  • @salmansayyad4522
    @salmansayyad4522 หลายเดือนก่อน

    Thanks, this is really valuable

    • @ArjanCodes
      @ArjanCodes  28 วันที่ผ่านมา

      You're very welcome!

  • @alefrodrigopereira9708
    @alefrodrigopereira9708 ปีที่แล้ว

    Very good. Thanks for sharing your knowlage with us.

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว

      My pleasure!Thanks for your comment :)

  • @zscoder
    @zscoder ปีที่แล้ว +1

    How were you able to have a terminal as a tab in this video on vscode?

  • @awuyadaniel8982
    @awuyadaniel8982 10 หลายเดือนก่อน

    Wow.. Made it look so easy
    Thank you very much

    • @ArjanCodes
      @ArjanCodes  10 หลายเดือนก่อน

      Glad the video was helpful!

  • @thanoslyras3906
    @thanoslyras3906 หลายเดือนก่อน

    Very helpful video about poetry! By the way what is the theme for your terminal?

  • @MrSith-yp3yq
    @MrSith-yp3yq ปีที่แล้ว

    Another fantastic video! Thank you 🙂

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว

      Glad you enjoyed it!

  • @rbalfanz
    @rbalfanz ปีที่แล้ว

    I like pip-compile (from pip-tools) for the simplicity and keeping with the de facto requirements.txt file.

  • @SumitSahoo
    @SumitSahoo ปีที่แล้ว

    Thanks for introducing me to Poetry :)

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว

      You are very welcome! :)

  • @_jdfx
    @_jdfx ปีที่แล้ว

    Very cool! it's like Cargo but for Python :)

  • @_rtdp_
    @_rtdp_ ปีที่แล้ว

    poetry + poethepoem = easy python development ❤

  • @jithinsasikumar9576
    @jithinsasikumar9576 ปีที่แล้ว

    Thanks a lot for this video. Loved it :)

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว

      Glad you liked it!

  • @dvdsdr-e6t
    @dvdsdr-e6t ปีที่แล้ว

    The metaverse joke was fire 😄

  • @alaindettorre5807
    @alaindettorre5807 2 หลายเดือนก่อน

    Thank you Arjan, that was helpful.
    Coming from the Node world, I thought Python had something more stable resembling the typical package.json file in Node projects, which seems to be this pyproject.toml file. Although Poetry seems nice, it's still a non-standard solution to a common problem. Meh

  • @ErikS-
    @ErikS- ปีที่แล้ว

    Great video!
    I think some viewers may be confused with the "shell". The difference between "normal commands" and "shell commands" isn't that clear in the video.

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว

      Thanks for the feedback!

  • @bonquaviusdingle5720
    @bonquaviusdingle5720 ปีที่แล้ว

    poetry lock
    poetry update
    Much simpler than a lot of other managers

  • @Mike-dt1yg
    @Mike-dt1yg ปีที่แล้ว +1

    Poetry rocks!

  • @wevertonmarx
    @wevertonmarx ปีที่แล้ว +4

    Can you make a video about Poetry's competitor PDM and compare the two?

    • @M3MYS3LF1979
      @M3MYS3LF1979 ปีที่แล้ว +1

      Ditto the newest kid on the block, Rye. Same dev as Flask

  • @MikeCorvin-x4p
    @MikeCorvin-x4p ปีที่แล้ว +2

    As always, thanks Arjan for your excellent content! I've not tried Poetry yet but I can't yet see a compelling reason to do so vs using conda/mamba (I usually use the latter). It does look pretty easy to use, but not any easier than conda, just different. What am I missing about Poetry? It does have its enthusiasts here in the comments. How is it's spec easier than a conda env spec?
    Having .venv in the project folder seems ok, but I assume you gitignore it and recreate it as needed so it doesn't clutter things up?
    What I've done using cookiecutter is to setup a project template with simple make machinery that does conda package generation running 'out of the box' so it's easy to deploy the project as a conda package to a local channel (or other). It creates a project conda env with the project with a basic set of packages for dev, incl. sphinx and pytest. It also does sphinx docs and comes with an initial set of strawman doc files. The make also maintains a conda env spec yaml file so I don't bother with requirements.txt and other devs can recreate the env on their platforms when we share the project through a local GitLab (or just a local bare repo). If I need to deploy a wheel or source package the template has all the bits to do that as well (our use cases do not involve deploying to PyPi or other public repos).
    A consideration for us is that we use conda to set envs in which analysts do interactive Python work for operations. In future we might need shell scripts that specify which env to use when invoking particular versions of tools. Some analysts don't even use conda directly, it's invoked in setup scripts to set the correct env or their path is just set to the correct, shared env location when they log in. I guess this is more of the data-sciencey use case that conda is intended for!
    The most painful thing about Python packaging is the ever evolving 'how to do' Python packaging question. What I have in that cookiecutter is a bit of a frankenstein between the setup.py, setup.cfg, the new kid on the block pyproject.toml, and the conda-recipe meta.yml. (I need to watch your recent vid about the PyPi way...)

  • @mounikaav46
    @mounikaav46 8 หลายเดือนก่อน

    Great vedio. how can we debug the poetry app from VSCode ?

  • @daineminton9687
    @daineminton9687 ปีที่แล้ว +1

    Love the videos & quality work you put into them. Could you at some point do some examples, such as: wave function collapse, etc ...?

  • @MatiasZulberti
    @MatiasZulberti 9 หลายเดือนก่อน

    Hello @ArjanCodes, great jvideo about poetry! Thanks! I see that you are using a Python's shell??? What kind of magic is that? Is it an extension of VScode? Thanks man! Have a great day!

  • @DaveParr
    @DaveParr ปีที่แล้ว +1

    @arjancodes great video as always. I'm curious about how you have your terminal set up to get context aware autocomplete suggestions? E.g. the drop down like prompts that describe the rest of the commands and flags?

    • @waylune
      @waylune ปีที่แล้ว

      It's Fig

  • @senzmaki
    @senzmaki 10 หลายเดือนก่อน

    nice vid, what do you use for the terminal intellisense

  • @yomajo
    @yomajo ปีที่แล้ว +1

    Sticking to pipenv, thank you. Still ("Activated") post exit, change in conventional keywords (add vs install, remove vs uninstall). If you don't publish packages, I don't see poetry benefits over pipenv. For docker, pipenv has support for requirements.txt (the old dusty way) and poetry does not support it. Having setup pipenv in docker image, gotta say, it's ugly, so I would imagine poetry is no different in that front.

  • @flyhawksfly
    @flyhawksfly 9 หลายเดือนก่อน

    Thank you for this great intro! Unrelated: how are you getting that autocomplete tooltip in your vscode terminal ?

  • @pythonsamurai
    @pythonsamurai ปีที่แล้ว +1

    I saw almost 0 real pros to use some wrapper over pip. What poetry is actually do beside just adding reqs to file for you which pip won't be able to do?

  • @abencomo
    @abencomo 7 หลายเดือนก่อน

    @ArjanCodes, is that Python tab a plug-in console for VSCode?

  • @tpag20
    @tpag20 ปีที่แล้ว +2

    how about the PDM

  • @EngineerNick
    @EngineerNick ปีที่แล้ว

    I adopted 'hatch' for package builds because it claims to more closely follow modern PEP standards, but after this video, and reading the comments that mention PDM, I am very confused about the best tool to use :S

  • @UnniKrishnanKumar
    @UnniKrishnanKumar 3 หลายเดือนก่อน

    With respect to the DevOps pipeline, when building the Docker image what are the best practise. Do we install poetry etc. If you have already written about this please do share the links

  • @djl3009
    @djl3009 ปีที่แล้ว +1

    Thanks. Poetry seems really useful but I was put off looking at it more closely a few months ago, after seeing a video on the anthonywritescode youtube channel, where he explained the reasons why he would never use Poetry. Besides citing technical reasons, his decision not to use Poetry also included a "broken trust" issue regarding the actions of package owners.

  • @adibmosharrof217
    @adibmosharrof217 ปีที่แล้ว

    what terminal do you use? its really handy to have autocomplete feature in terminal

  • @kluchtube7042
    @kluchtube7042 ปีที่แล้ว

    hey can you tell how do you use intelli sense like code suggestion in your terminal when you type python commands ?

  • @talhaamir9023
    @talhaamir9023 ปีที่แล้ว

    Great Video, just wanted to know if poetry is capable of managing multiple dependency files like we de have different requirements.txt from dev,stag and prod. If that is supported would love to switch to it.

  • @Djzaamir
    @Djzaamir ปีที่แล้ว

    Hi great tutorial, although can anyone tell me how is the auto complete working in his shell, it looks quite amazing and useful.

  • @IanWootten
    @IanWootten ปีที่แล้ว

    12:16 You mention if you're using "pipenv" packages won't automatically be added to a requirements.txt file. I'm guessing you meant to say "pip", since with pipenv dependencies are added to the Pipfile and Pipfile.lock.

  • @ThiagoJoséMoserPoletto
    @ThiagoJoséMoserPoletto ปีที่แล้ว

    nice content

  • @import_this
    @import_this ปีที่แล้ว +1

    Hello Arjan!
    Thanks for your video!
    I would like to know what is the difference between "pip install poetry" and installing with curl (from official docs)? See the difference when working with pyenv?

    • @bartman060890
      @bartman060890 ปีที่แล้ว +1

      Follow the official documentation for installation. Rationale: it is better isolated from your python installation. There are scenarios where poetry will uninstall itself if it was installed through pip, because it sees poetry installed even though it is not a dependency of your package.
      Poetry in general removes packages that are not a dependency of your package. I combine poetry with pipx. With pipx I install dev tools like black, mypy, pylint, pycln, etc. In that way they are out of sight for poetry, but I can still use them.

    • @import_this
      @import_this ปีที่แล้ว

      @@bartman060890 Thanks for such a detailed answer! It makes sense.
      What is the advantage of combining pipx and poetry instead of using --group dev?

    • @bartman060890
      @bartman060890 ปีที่แล้ว +1

      @@import_this that would work too! I prefer this approach as it extends nicely to all my python work, also if I don't use poetry. But by all means experiment and see what works best for you :)

    • @import_this
      @import_this ปีที่แล้ว +1

      @@bartman060890 I will :)

  • @anefuoche1053
    @anefuoche1053 ปีที่แล้ว

    I am a beginner. how did you arrive in the environment(IDE OR FOLDER) you are using for installing poetry?

  • @itsaname-t5c
    @itsaname-t5c 10 หลายเดือนก่อน

    perfect thanks

    • @ArjanCodes
      @ArjanCodes  10 หลายเดือนก่อน

      Glad the video was helpful!

  • @RonWaller
    @RonWaller ปีที่แล้ว

    can Poetry config in project setting be a default when setting up future projects?

  • @benengelen6224
    @benengelen6224 ปีที่แล้ว

    For a quite big project we are going to build about 50-100 packages, some larger or more complicated then others. Would it be a good practice to create a project and a venv. for each package we build? And is there a good way to host them privately, and have a way to use these packages to build our applications

  • @wernerlippert5499
    @wernerlippert5499 ปีที่แล้ว

    Thank you for this video. Do you know how to install / compile prophet using any of the virtual env tools? (for python 3.11.2)

  • @Ezio2848
    @Ezio2848 ปีที่แล้ว +1

    Hello, love your videos!
    Maybe there is something I'm missing, but if I'm already working well with conda, is there any reason I should switch over to Poetry?

    • @pythonsamurai
      @pythonsamurai ปีที่แล้ว

      there is no reason to switch even from pip actually

  • @tommybrecher7742
    @tommybrecher7742 ปีที่แล้ว

    What are you using on the shell to get those completions? That look really nice

    • @blanketfish
      @blanketfish ปีที่แล้ว

      If you go to the poetry page, there's actually an installation option to get Shell completion for whatever shell you use

  • @iliandili
    @iliandili ปีที่แล้ว

    I try Poetry and I had problem to add few simple packages. Like resolving dependencies last for 500 seconds and then I stopped. After that I try to remove some dependencies (for example Django) and again loooong process currently on 203 seconds :) It looks that I'm going back to pip & venv & requriments.txt :)

  • @converter
    @converter ปีที่แล้ว

    May I ask whats the type hinting in your command line? :)

  • @brainforest88
    @brainforest88 ปีที่แล้ว

    I started with Python a year ago and came across pipenv and use it since then. Is there an option like the --dev in poetry to install packages only in dev environment? For example, I install mypy and pytest only in dev but not when I run it in prod.

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w ปีที่แล้ว

    why do you prefer to have the environment inside your project?
    but if you want to share the same virtualenv across multiple projects, then is it better to keep it at default?
    Given that creating a virtualenv inside of each project ends up taking up more disk space, would it be possible to have multiple projects share the same environment? If so, where do you recommend to put the environment in that case?

  • @alirezahaghi2812
    @alirezahaghi2812 ปีที่แล้ว

    how your terminal suggests all arguments? I've already installed zsh and oh-my-zsh, but it does not suggest options.

  • @pingpangqiu5605
    @pingpangqiu5605 7 หลายเดือนก่อน

    should poetry be installed in an venv or globally?

  • @stoicescucornel4998
    @stoicescucornel4998 ปีที่แล้ว

    What are the differences between poetry and pipenv? I don't see many based on this video, maybe just publishing packages on pypi.

  • @michaelxia99
    @michaelxia99 ปีที่แล้ว

    Does anyone know what terminal setting he is using to get that green arrow and short clean path?

  • @M3MYS3LF1979
    @M3MYS3LF1979 ปีที่แล้ว

    Can export a requirements.txt file for backward compatibility/docker containers:
    `poetry export -f requirements.txt --output requirements.txt --without-hashes`

  • @FrocketGaming
    @FrocketGaming ปีที่แล้ว

    I ran into an issue the moment I installed poetry. I'm pretty new to Python so I don't know what the issue is but no matter if I try in bash, powershell etc all poetry commands are not found. I tried adding it to the $PATH and nothing works. Any help would be appreciated but nothing has worked for me.
    I tried it again on another computer (both use the Microsoft Python) and it worked perfectly but just doesn't work on this other laptop.

  • @alessandrosantini8956
    @alessandrosantini8956 ปีที่แล้ว

    How do you deploy an application built with poetry, e.g. what do I have to do if I want to containerise it?

  • @rangav8638
    @rangav8638 10 หลายเดือนก่อน

    If I have sub modules that have their own packages that need to be installed (thing of plugins). How will we manage installation of these with Poetry?

  • @geozeke
    @geozeke ปีที่แล้ว

    Just curious. Do poetry and dependabot work well together? I've read conflicting reports. I tried it on a test repo, and it seemed like dependabot recommended radical version changes in both pyproject.toml and poetry.lock, where poetry said "No dependencies to install or update"

  • @PraecorLoth970
    @PraecorLoth970 ปีที่แล้ว

    I'm still on the fence with Poetry, mostly because of the scientific computation packages I depend on. Conda is very very slow, but it can manage those packages easily, and can manage different virtual environments with different Python versions. I'm don't know if using conda for virtual environments and poetry for most of package management is a feasible solution.

    • @wevertonmarx
      @wevertonmarx ปีที่แล้ว

      Did you try mamba? It's a conda replacement written in C++ and parallel downloads for performance

  • @djchrisi
    @djchrisi ปีที่แล้ว

    How do you manage multiple python interpreters with poetry? how do you install them and make sure, they don"t interact with the system installed interpreter?

  • @davea136
    @davea136 ปีที่แล้ว

    Arjan is it okay if I link to this video as a reference in a post I am writing about virtual environments (venv, renv, jail-rooted servers, etc.)?
    Thank you for the excellent channel!

    • @ArjanCodes
      @ArjanCodes  ปีที่แล้ว

      Sure Dave! You can link it as a reference :)