DEV Community

Discussion on: How To Start Web Development With Django 3.0.4

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

At this point of time, I am not even sure if Virtual Environment should be used for Django. (Not mentioned in official doc, but mentioned in Django Girls.)

If not using Virtual Env, Docker should be used at the very least, I believe.

Also, I have never tried Conda, only bare minimum Python.

Collapse
 
yaser profile image
Yaser Al-Najjar

Believe me and just use the virtualenv, even with dev env in docker... Cuz you need to mount the volume of your venv to not install the dependencies again everytime you restart the container.

Collapse
 
highcenburg profile image
Vicente G. Reyes

Every project should have a virtualenv because every project has different version dependencies.

Collapse
 
demianbrecht profile image
Demian Brecht

Why wouldn't you want to use virtual envs for Django? I use them regularly (at least, when not running in a container).

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Just to say that, for some reasons, virtualenv is not mentioned in the official website.

Thread Thread
 
mh_shifat profile image
5hfT

At its core, the main purpose of Python virtual environments is to create an isolated environment for Python projects. This means that each project can have its own dependencies, regardless of what dependencies every other project has.
The great thing about this is that there are no limits to the number of environments you can have since they’re just directories containing a few scripts. Plus, they’re easily created using the virtualenv or pyenv command line tools.