Question

I have installed django framework with Python 2.7 and created all the paths. The problem is that whenever I type

django-admin.py command

the file itself is opening up. I am using Windows 7 64 bit.

Thank you.

Was it helpful?

Solution

You need to type

python django-admin.py command

If you get an error saying 'python is not recognized as an internal or external command..' you also need to add the python path to your environment path.

OTHER TIPS

The problem is that .py files are not associated with python, so it gets treated as a normal txt file. You can either:

python django-admin.py command

(and see @VladSchnakovszki answer for errors which might pop up with that command), Or configure the files by right clicking > Properties, then (under General options):

enter image description here

Point it to python.exe and tell it to associate all files with the same extension with python as well.

P.S. a personal recommendation: When working in a windows environment I've had a good experience with installing ActiveState Python. It automatically sets the required paths, and also installs pip and other goodies that you'll probably need along the way (don't be scared of the priced version, there's a free community version too).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top