Using Docker Instead of Virtual Environments (venv)
I was talking to a co-worker recently about my use of docker instead of virtual environments (venv) and he mentioned that I should probably write something up about it. It didn’t occur to me that this might be a more preferred method than venv until I had this discussion. It makes sense to briefly explain venv and then how I use docker instead. What Are Virtual Environments (venv)? I think this is a great place to start. If you’ve ever used Python, you’ve probably seen some mention of virtual environment (venv). I won’t go too crazy on explaining them and how to use them. In short, venv allows you to create a Python environment that is self contained to help you not clutter up your machine with various libraries. Worse yet, if you need to run multiple versions of the same library, you can have issues running everything in one environment. For the real details, I suggest you check out the Python documentation on venv. ...