5
votes

I'm trying to create a Django project. I've looked up solutions everywhere and it is still not working.

I am running Python 2.7 and Django 1.3.1.

I have tried to create a symbolic link but it doesn't work because django-admin.py already exists.

Here is the bash:

user@user:~$ django-admin.py startproject mysite
django-admin.py: command not found

user@user:~$ sudo ln -s /usr/lib/python2.7/dist-packages/django/bin/django-adminpy /usr/local/bin/django-admin.py
ln: failed to create symbolic link `/usr/local/bin/django-admin.py': File exists
4
python django-admin.py startproject mysite - mberacochea
Thanks for the response, I have tried that and I have gotten: user@user:~$ python django-admin.py startproject mysite python: can't open file 'django-admin.py': [Errno 2] No such file or directory - user1670032
I know it's off topic, but did you consider using a recent version of django if you are creating a new project? - OBu

4 Answers

10
votes
user@user:~$ django-admin startproject mysite
2
votes

Check whether /usr/local/bin is in $PATH.

If it is not in $PATH, set it as follow.

export PATH=$PATH:/usr/local/bin
0
votes

Make sure you got the right directory. You can do so by changing directory (cd) as such

cd C:\

then if django-admin startproject mysite does not work

try this instead ./django-admin startproject mysite

-3
votes

Type python django-admin startproject mysite in PowerShell.