Three important factors for your environment:
- Isolation
- Determinism
- Similarity
site-packages
$ mkdir tutorial
$ virtualenv ./tutorial/
New python executable in ./tutorial/bin/python
Installing setuptools............done.
Installing pip...............done.
$ source ./tutorial/bin/activate
(tutorial)$
Create a requirements.txt
in the tutorial
directory with a single requirement in it.
Django==1.5.1
And then we can use pip to install the dependencies.
(tutorial)$ pip install -U -r requirements.txt
Downloading/unpacking Django==1.5.1
Downloading Django-1.5.1.tar.gz (8.0MB): 8.0MB downloaded
Running setup.py egg_info for package Django
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing collected packages: Django
Running setup.py install for Django
changing mode of build/scripts-2.7/django-admin.py from 644 to 755
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
changing mode of /home/nathan/p/edt/bin/django-admin.py to 755
Successfully installed Django
Cleaning up...
(tutorial)$ django-admin.py startproject addressbook .
manage.py
./addressbook
__init__.py
settings.py
urls.py
wsgi.py
django-admin.py
that operates on your project. You can run the tests or the development server using this.(tutorial)$ python ./manage.py startapp contacts
./addressbook
./contacts
__init__.py
models.py
tests.py
views.py