10 Comments
Apr 13Liked by Bite Code!

I can't remember when was the last time I read something that resonated with me 100% like your article. Thank you for saving me countless hours I would have waisted without your guide.

Expand full comment

thanks for the extensive tutorial on virtual environments and pip.

I have been using Python for more than 10 years now and I found it painful until very recently.

I believe your tutorial make it easy but it doesn't answer 2 big questions:

- how can I install multiple versions of Python on the same machine? Pyenv solves this problem, but you don't suggest to use it. Do you have an alternative?

- why should I not use Poetry? Just saying not to use it, it's not enough. You should give a good motivation not to use it. Otherwise it is just a matter of taste. I like Poetry and I prefer it to keeping the venv and the requirements.txt in sync.

I'll shortly write a Substack article on how I streamlined an easy setup using Poetry, virtualenv and Devenv.sh (which internally use Nix)

Expand full comment
Dec 31, 2023Liked by Bite Code!

Thank you so much for this! I've been confused about virtual environments for a long time. This really, really helps. However, this all raises a couple questions for me:

1. If I create a virtual environment for all the little scripts I write for myself, do I have to activate that virtual environment (or use the long awkward path somehow) whenever I want to run one of those scripts? That seems painful

2. If I want to distribute a script I wrote to someone else, do they now have to learn how to use virtual environments? That seems extra painful.

Expand full comment

Great article!

In the part about "Recreating an virtual environment" you probably meant "pythonX.x -m pip install -r requirements.txt" right? Since we shouldn't call pip without python -m ?

Expand full comment