0

I am trying to begin a project(first one ever) with Django on a Windows 7 machine, and am encountering issues with 'startproject.' I have made sure Django is installed correctly and it seems as though it is working fine, however I run into a problem when I try "django-admin.py startproject sitename"

I have tried using the full path length (C:\Python25\Lib\site-packages\django\contrib\auth\admin.py) and still nothing. I've tried multiple things on both the normal command prompt as well as the python command line. Any ideas?

David
  • 1
  • Yeah. Try telling us what the issue is. – Ignacio Vazquez-Abrams Aug 02 '11 at 04:55
  • What he means is post the exact error message, tell us about how you installed Python (ActiveState, from Python.org?), etc. – agf Aug 02 '11 at 04:57
  • did you explicitly call the interpretter? which is the error message? – christophe31 Aug 02 '11 at 08:00
  • maybe it's something to do with adding the python path. Take a look at how to do that here [How to add to the pythonpath in windows 7](http://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows-7) – darren Aug 02 '11 at 09:56

2 Answers2

0

If you are using Windows 7, make sure that you are running the Windows command prompt as Administrator. However, I'm afraid that without knowing more details about the exact issue that you are finding it will be very difficult to help you.

You mention that you are going to do your fist Django project. If you still have issues with the environment configuration and you just want to focus in the development tasks, you may want to try the BitNami DjangoStack. It is free and we created it specifically for developers, so everything works out of the box. It includes Python 2.6.5, Apache with mod_wsgi, Django 1.3 and you can select to install PostgreSQL, MySQL or both. It also includes SQLite.

kaysa
  • 1,491
  • 13
  • 9
0

Have you tried this?

C:\path\to\parent\folder>C:\Python25\Lib\site-packages\django\bin\django-admin.pyc startproject MY_DJANGO_PROJECT
jcfollower
  • 3,103
  • 19
  • 25
  • Thank you all very much. I installed it from the django website, however I couldn't get the setup.py to work, so I manually put the files into the site-packages folder like the website said I could if I was encountering errors. Right now, I enter the following into the windows command prompt: [C:\Python25\Lib\site-packages\django\bin\django-admin.py startproject dhsite] and the error I am getting is: [warning: Not importing directory 'C:Python25\Lib\site-packages\django\contrib\auth\locale' : missing __init__.py]. At the moment, the __init__.py file is in 'bin'. – David Aug 02 '11 at 15:05
  • Make sure there is an __init__.py file in the contrib\auth\locale folder. If not, just create and save and empty one there. – jcfollower Aug 02 '11 at 15:58
  • It works! Apparently it had worked before, as I found a folder with that name on my C drive, however it was still giving me errors. Now that I added the __init__.py file to the locale folder, it works like a charm! Thank you very much, jcfollower! – David Aug 03 '11 at 00:15