python - Anybody get django cookiecutter to work with anaconda instead of virtualenv? -


just when think i'm starting handle django start reading 2 scoops of django advise use cookiecutter instead of regular django-admin startproject. authors of 2 scoops big on virtualenv. i've been using anaconda because everywhere says it's better virtualenv. i'm tempted rid of anaconda , use virtualenv try work, figured i'd ask here first.

anybody know how cookiecutter work anaconda???

i think you're bit confused anaconda , virtual environment is. @ end of day, both python installations (hopefully) include binaries needed run code.

the answer question use virtual environment, not anaconda project, store dependencies in requirements.txt file has project base code can install exact dependencies needed project virtual environment.

so, difference? anaconda python bunch of preinstalled libraries geared towards data analysis. means programmer don't have worry installing matplotlib, pandas, or plethora of other libraries. includes binary executes python code.

a virtual environment barebones python environment. literally copies binaries needed run python code wherever create virtual environment. typically create environment in local directory (python 3.6+):

python -m venv .venv

which create virtual environment in current directory in hidden directory .venv. can install dependencies environment needed project after setting default interpreter using source. e.g.

source .venv/bin/activate

you'll notice if run which python, it'll point shell instead of default python before hand.. example,

$ python /users/you/path/to/.venv 

now install depencies needed.. i.e.

pip install <library>

or better

pip install requirements.txt


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -