Simple Python [executable] version management, that is.

I’m just incredibly happy that Fedora has every Python version in its official repo and I don’t need pyenv at all.

permalink
report
reply
3 points
*

When bringing people online from other languages, I first get them to find out what python there is in their environment and go with that if it’s recent enough. Then I tell them about pyenv and it’s plugins after a bit. Whenever I go straight into installing pyenv, it feels like I’m throwing some one in the deep ocean.

permalink
report
reply
2 points

I’ve seen too many issues caused by relying on the system python. For starters, it’s much more difficult to fix if you screw something up.

I tell everyone to use pyenv – but only to install specific versions of python. I then create a primary venv for a couple of versions, and that’s what I use as my “system” version. Each project creates a separate venv based on the pyenv versions. I use autoenv to activate and deactivate as needed.

It’s a little more setup, but it avoids so much magic, and it’s extremely robust.

permalink
report
parent
reply
4 points
*

I use it everyday. I feel it’s my secret sauce in python dev… pyenv-virtualenv is pretty useful with it also

permalink
report
reply
3 points

I found pyenv to be buggy at times, not properly setting the default (global) python version. I ultimately uninstalled pyenv and also uninstalled any additional Python installs outside of the system default.

Now, I do 100% of my Python work inside of Docker containers. This has solved any issues I’ve ever had with Python environments and PYTHONPATH . It’s also made me a stronger developer when it comes to using Docker.

I don’t see myself ever going back. A Docker container is the perfect Python environment.

permalink
report
reply
5 points

I highly recommend rtx over pyenv/asdf. For one thing, you’ll still be able to which python and get a useful response, as it works by altering your PATH rather than relinking shims.

permalink
report
reply
2 points

I wouldn’t argue that a useful response from which isn’t a good thing, but how often do you need to use it with Python? I’ve been using pyenv with pipenv for years and almost never need to do this.

permalink
report
parent
reply
1 point

How often? Sometimes 🤷.

There are other benefits to the tool that may be more meaningful for your usage, but of course I wouldn’t claim there’s anything wrong with using the tools you like.

I think when I used pyenv it was the single slowest part of my shell initialization.

permalink
report
parent
reply

Python

!python@programming.dev

Create post

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

📅 Events
Past

November 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
  • Pythörhead: a Python library for interacting with Lemmy
  • Plemmy: a Python package for accessing the Lemmy API
  • pylemmy pylemmy enables simple access to Lemmy’s API with Python
  • mastodon.py, a Python wrapper for the Mastodon API
Feeds

Community stats

  • 732

    Monthly active users

  • 468

    Posts

  • 2.4K

    Comments