0

On windows 7 I have python2.6.6 installed at C:\Python26 I wanted to install Django, so I:

  1. downloaded and untarred the files into C:\Python26\Django-1.4
  2. ran python setup.py install
  3. verified it was installed by opening IDLE and typing, import django

The next part is the problem... in the tutorial, it says to now run django-admin.py startproject mysite, however django-admin.py wasn't found, and while looking for it, I discovered that there is a duplication in the directories

  • C:\Python26\Django-1.4\build\lib\django
  • C:\Python26\Django-1.4\django

I didn't see anything in setup.cfg that would allow me to make sure that didn't happen or to pick a different setup folder, etc... but in the file C:\Python26\Django-1.4\INSTALL, it is stated that "AS AN ALTERNATIVE, you can just copy the entire "django" directory to python's site-packages directory"

So for my question: besides avoiding this duplication of code in the Django directories, what else is the difference with using the setup.py install command versus copying the directory? Are there other pros/cons?

diegueus9
  • 29,351
  • 16
  • 62
  • 74
Bryan Wolfford
  • 2,102
  • 3
  • 20
  • 26
  • Maybe I just gave too much information before the actual question... after the install, there are five different django-admin.py files now: C:\Python26\Django-1.4\build\scripts-2.6\ C:\Python26\Scripts\ C:\Python26\Lib\site-packages\django\bin\ C:\Python26\Django-1.4\build\lib\django\bin C:\Python26\Django-1.4\django\bin\ So, with that in mind, should I have not used the setup.py and instead just copy the one directory over to my site-directories?.. it just seems like it would be cleaner (unless I'm missing something else that the setup.py does) – Bryan Wolfford Apr 21 '12 at 03:41
  • Note that in Windows the default site-packages directory is `Python##\Lib\site-packages` while in Unix the default is `Lib/python##/site-packages`!!! – Bryan Wolfford Apr 27 '12 at 02:05

1 Answers1

0

Try adding "C:\Python26\;C:\Python26\Scripts;" to your PATHenvironmental variable and then running django-admin.py startproject mysite.

garnertb
  • 9,454
  • 36
  • 38
  • Well, I don't have any problem with that... but before I create a project, I would like to know if there is any benefit to using the setup.py install command versus copying over the django directory to my python26/site-packages folder. – Bryan Wolfford Apr 17 '12 at 00:07
  • "The next part is the problem... in the tutorial, it says to now run django-admin.py startproject mysite, however django-admin.py wasn't found..." Implies that you have a problem with with the environmental variable.... – garnertb Apr 17 '12 at 09:47
  • Maybe I just gave too much information before the actual question... after the install, there are five different django-admin.py files now: C:\Python26\Django-1.4\build\scripts-2.6\ C:\Python26\Scripts\ C:\Python26\Lib\site-packages\django\bin\ C:\Python26\Django-1.4\build\lib\django\bin C:\Python26\Django-1.4\django\bin\ So, with that in mind, should I have not used the setup.py and instead just copy the one directory over to my site-directories?.. it just seems like it would be cleaner (unless I'm missing something else that the setup.py does) – Bryan Wolfford Apr 17 '12 at 23:31