You should use pip to install django. This is how I go about it, from a fresh install.
mkdir ~/virtual mkdir ~/projects pip install virtualenv # unnecessary in python 3.3+ pip install virtualenvwrapper # use this. it will make your life much simplerecho "export WORKON_HOME=$HOME/virtual" >> ~/.bashrcecho "export PROJECT_HOME=$HOME/projects" >> ~/.bashrcecho "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc source ~/.bashrc After that, create your first virtualenv using mkvirtualenv foo, activate it using workon foo, and deactivate it with deactivate. Install packages using by issuing pip install commands, so if you want django, you can use pip install django for the latest release or pip install -e git#https://github.com/django/django.git for the latest development version. You might want to check the docs for virtualenv, virtualenvwrapper and pip. You may also benefit from using yolk (python package) to check what you already have installed in each virtualenv.. Best of luck! Cheers, AT On Sat, Jul 19, 2014 at 7:21 PM, Dan Bikle <d...@stockbeaver.com> wrote: > Hello World, > > I'm curious about working with the dev-version of Django. > > I want to get skilled at using Django, Python 2.7.8, and virtualenv > together. > > I see this page: > > https://github.com/django/django/blob/master/INSTALL > > I installed python and then virtualenv: > > d...@cen113.dan ~ $ which python > /home/dan/venv1/bin/python > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ /home/dan/venv1/bin/python > /home/dan/venv1/bin/python > Python 2.7.8 (default, Jul 15 2014, 03:37:39) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> quit() > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ > > The above INSTALL page says this: > > AS AN ALTERNATIVE, you can just copy the entire "django" directory to > Python's > site-packages directory > > I did this: > > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ cd /home/dan/venv1/lib/python2.7/site-packages > d...@cen113.dan ~/venv1/lib/python2.7/site-packages $ > d...@cen113.dan ~/venv1/lib/python2.7/site-packages $ > d...@cen113.dan ~/venv1/lib/python2.7/site-packages $ > > git clone https://github.com/django/django.git > > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ ls -la ~/venv1/lib/python2.7/site-packages/django/ > total 112 > drwxr-xr-x. 9 dan dan 4096 Jul 19 21:41 . > drwxrwxr-x. 8 dan dan 4096 Jul 19 21:41 .. > -rw-rw-r--. 1 dan dan 26288 Jul 19 21:41 AUTHORS > -rw-rw-r--. 1 dan dan 913 Jul 19 21:41 CONTRIBUTING.rst > drwxrwxr-x. 17 dan dan 4096 Jul 19 21:41 django > drwxrwxr-x. 13 dan dan 4096 Jul 19 21:41 docs > drwxrwxr-x. 2 dan dan 4096 Jul 19 21:41 extras > drwxrwxr-x. 8 dan dan 4096 Jul 19 21:59 .git > -rw-rw-r--. 1 dan dan 249 Jul 19 21:41 .gitattributes > -rw-rw-r--. 1 dan dan 123 Jul 19 21:41 .gitignore > -rw-rw-r--. 1 dan dan 136 Jul 19 21:41 .hgignore > -rw-rw-r--. 1 dan dan 611 Jul 19 21:41 INSTALL > -rw-rw-r--. 1 dan dan 1552 Jul 19 21:41 LICENSE > -rw-rw-r--. 1 dan dan 1639 Jul 19 21:41 MANIFEST.in > -rw-rw-r--. 1 dan dan 1782 Jul 19 21:41 README.rst > drwxrwxr-x. 2 dan dan 4096 Jul 19 21:41 scripts > -rw-rw-r--. 1 dan dan 404 Jul 19 21:41 setup.cfg > -rw-rw-r--. 1 dan dan 3302 Jul 19 21:41 setup.py > drwxrwxr-x. 198 dan dan 12288 Jul 19 21:41 tests > drwxrwxr-x. 2 dan dan 4096 Jul 19 21:41 .tx > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ > > > At this point I have done what the INSTALL page says I can do. > > I tried this: > > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ which python > which python > /home/dan/venv1/bin/python > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ > d...@cen113.dan ~ $ python > python > Python 2.7.8 (default, Jul 15 2014, 03:37:39) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import django > import django > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: No module named django > >>> > >>> > > Since I'm using virtualenv and the latest dev-version of Django together, > I must have a loose connection somewhere in my setup. > > > I have some questions: > > q1: Is this statement true: > " > AS AN ALTERNATIVE, you can just copy the entire "django" directory to > Python's > site-packages directory > " > ?? > > q2: If import django failed for you how would you debug it? > > q3: If I import a module and python cannot see it, do I need to be looking > at any env variables? > > Dan > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/7f2b25db-af0d-4334-b5cf-1295b8f643a4%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/7f2b25db-af0d-4334-b5cf-1295b8f643a4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKBiv3x0TU2EDqn4EXZ3KTrRL23sURVNwhn1bx1BFLjsxUP2WA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.