django-admin.py startproject doesn't work

1,251 views
Skip to first unread message

raddy

unread,
Feb 13, 2012, 2:02:20 AM2/13/12
to Django users
I have windows7 OS and have installed Python27 and Django1.3.1
I have also set the path in the environment variables to: C:
\Python27\;C:\Python27\python.exe;C:\Python27\Scripts;C:\Python27\Lib
\site-packages\django\bin

Commands like python and import django works well but
when i try creating a new project I get the following error:

C:\Python27\Django-1.3.1>django-admin.py startproject mysite
'django-admin.py' is not recognized as an internal or external
command,
operable program or batch file.

C:\Python27\Django-1.3.1>

Please help!!!
Message has been deleted

James Jang

unread,
Feb 13, 2012, 11:34:14 AM2/13/12
to Django users
Is "django-admin.py" file in the directory, "Django-1.3.1"??



(If not copy or move the file from in "Django-1.3.1/django/bin/" to
"Django-1.3.1/".)

jak.plopelor

unread,
Feb 13, 2012, 11:45:29 AM2/13/12
to Django users
I don't know, but on ubuntu it's call just 'django-admin' without the.
py

Bob Carlson

unread,
Feb 13, 2012, 1:11:34 PM2/13/12
to django...@googlegroups.com
I had this problem. I read about *.pth files and found one for the PIL library.

I put a file called django.pth in .../site-packages/.

I put one line in the pth file: "django\bin".

I am confused about the pth file though. Should I have more directories in
there?

Cheers, Bob

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-
users+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-
users?hl=en.

Jonathan Paugh

unread,
Feb 13, 2012, 12:45:20 PM2/13/12
to django...@googlegroups.com
On 02/13/2012 11:01 AM, Dennis Lee Bieber wrote:
> On Sun, 12 Feb 2012 23:02:20 -0800 (PST), raddy <raddy....@gmail.com>
> wrote:
...
> Can you run ANY python script (.py) file by typing its name on the
> command line?... Say something that does nothing more than:
>
> print "I'm running"
>
> (test while /in/ the directory that has the file, first)
>
> My suspicion is that you don't have .py defined as a valid "command
> file extension" NOR do you have the associations set to run one. What

I'm pretty sure you can also make .py files executable by mucking around
in the Windows registry, if you don't have PowerShell--although I can't
recommend that, of course. You should be able to find tutorials for that
or similar, none of which will recommend actually doing it.

You have to make 2 registry entries, which will be similar to the
preexisting ones for .exe files. (command file extension and association).

Backup your registry and think about how much you value your Windows
installation. If you open regedit.exe, you can search for EXE, and you
will eventually find both entries that need to be replicated, albeit
among many unrelated entries.

However, I haven't used Windows OSes since 2009, and no one can make me
go back. I.e. if you do this, you're on your own.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages