3 ms·
Virtual environments are, sadly, absolutely crucial for Python beginners to get their heads around if they are to do anything more advanced then "hello world".
by simonw 5y ago
Virtual environments are, sadly, absolutely crucial for Python beginners to get their heads around if they are to do anything more advanced then "hello world".
When I'm getting someone started I usually say:
"There is a magic incantation involved in Python development called 'activating your virtual environment' - if stuff isn't working as you expect, check that you have done this. Development environments are the hardest thing about learning to program. I'm so sorry."
- BryanBeshore 5y agopip freeze > requirements.txt When first learning python and virtual environments, it took me a little bit of time to understand that the virtual environment is basically a clean slate. The command above saved a lot of time. I’d go so far as to having a set of requirements files ready to go for certain types of projects just to get started.
- coopreme 5y agoCheck out pipenv, it really is a lot simpler.