• ComplexLotus@lemmy.world
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    1 年前

    How do you guys update python versions and all the libraries you have installed? I have multiple like

    • pygame
    • ptpython
    • pandas
    • Pillow
    • icecream
    • … is it not a massive hassle to have to reinstall all of this with every new version and fight the old version on ubuntu?
    • monkey@lemmy.world
      link
      fedilink
      arrow-up
      21
      ·
      1 年前

      Pyenv! Let the OS have its own version and work on whatever version you want, whenever.

      • Scribbd@feddit.nl
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        1 年前

        Also pipx for cli tools. It creates isolated environments for every tool you install. And upgrading is one command away pipx reinstall-all --python (your pyenv).

    • Doccool@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      1 年前

      Conda is, to the alternative already mentioned, a great way to keep different versions of python and it’s packages for each project!

    • coffeewithalex@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      2
      ·
      1 年前

      On Linux, I’d just build my own Python binaries and make them available. But you can also use pyenv for the same thing if you’re ok with it.

      Then, using poetry, I have different projects with isolated environments.