Virtual Environments in Python Made Easy

Originally published at:

Most Python newcomers don’t know how to set up a development environment that follows the latest standards used by professional programmers, so this tutorial will teach you how to properly create a fully working Python development environment using industry accepted best practices.

Python Logo

Virtual Environments

There are so many libraries I use for my own personal projects, three web application development frameworks I use and many others I would love to explore in the near future. It is very clear that a serious project in Python depends on other packages written by other developers. If you are a Django developer, I am very sure you make use of South for performing automatic database migrations, Django Debug Toolbar for gathering various debug information about the current request/response, Celery for taking care of real-time operations and scheduling as well, and so on.

Continue reading this article on SitePoint

This was a great write up and very handy. I'd gotten a brief introduction to virtual envs and have used them in a handful or projects, but these additional tools (ie, virtualenvwrapper et al) are very handy, and already setup my work flow to reflect these suggested counterparts.

@jetbird Question: In regards to "best practices" for sharing projects, I know that many developers like Virtual Environments to be kept within the project folders themselves, while others prefer a centralized location (like in this write-up). My question is: When you're sharing your project, do you just create a requirements.txt file (from your dependencies) and then, upload your project, by which the next developer downloads and then pulls all modules from the requirements.txt into their own virtual environment? Is that generally how that works? That way, locally, it doesn't matter where the virtual env is stored so long as a requirements.txt file is generated?

Thank you for your hard work and any insight you might be able to provide in regards to my question!

1 Like