Maverick
Maverick

Reputation: 2760

django path problem in windows 7

I am having problems with path, of django-admin.py. It is in my python homes scripts folder, and i have setup a PATH variable too. But it is not working at all. Is it because of windows 7!?

EDIT I am able to use django-admin from command line when i am inside that scripts folder..but not from anywhere else.. that is, from other disk drives.

Upvotes: 1

Views: 1204

Answers (1)

Josh Smeaton
Josh Smeaton

Reputation: 48730

I believe that your problem is that the django-admin script can not be located when you try to run it from an arbitrary location. Please let me know if that's incorrect. In the future, you should try to provide any error messages that you receive, to help the community help you.

Can you show us your PATH environment variable? If I remember correctly, right click on 'My Computer', go to 'Properties', and on one of the tabs, you should see a list box with different environment variables set. Edit your question with the contents of the PATH variable.

If python is set as the default program for opening up .py files, then running the django-admin.py script should be as simple as:

django-admin.py command

This will only work if the django-admin.py script is located directly inside a directory that is on your PATH, or if you're inside the directory containing the script. You can also use a relative path to get to the script.

c:\development\django\> ..\..\python26\site-packages\django-admin.py command

The above assumes you're currently in c:\development\django\ at the command line, and have entered the text after >

Upvotes: 1

Related Questions