this post was submitted on 02 Oct 2023
98 points (99.0% liked)

Python

5396 readers
1 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

October 2023

November 2023

PastJuly 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 11 months ago
[–] [email protected] 10 points 11 months ago

itertools.batched() is pretty neat.

[–] [email protected] 6 points 11 months ago

This update just makes me thirstier for the next level optimizer currently in work. I think it's supposed to come out with 3.13.

[–] [email protected] 4 points 11 months ago (5 children)

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?
[–] [email protected] 20 points 11 months ago (1 children)

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

[–] [email protected] 6 points 11 months ago* (last edited 11 months ago)

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).

[–] [email protected] 7 points 11 months ago

You are 100% right, that's why we use virtual environments. Specifically we use poetry, which is fine.

[–] [email protected] 4 points 11 months ago

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

[–] [email protected] 1 points 9 months ago

The deadsnakes ppa is quite awesome

[–] [email protected] 1 points 11 months ago

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.

[–] [email protected] 2 points 11 months ago (1 children)

PEP 688 sounds useful. Might have to have a play.