Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django-admin.py not working (-bash:django-admin.py: command not found)

I'm having trouble getting django-admin.py to work... it's in this first location: /Users/mycomp/bin/ but I think I need it in another location for the terminal to recognize it, no?

Noob, Please help. Thanks!!

my-computer:~/Django-1.1.1 mycomp$ sudo ln -s /Users/mycomp/bin/django-admin.py /Users/mycomp/django-1.1.1/django-admin.py
Password:
ln: /Users/mycomp/django-1.1.1/django-admin.py: File exists
my-computer:~/Django-1.1.1 mycomp$ django-admin.py --version
-bash: django-admin.py: command not found
like image 769
Diego Avatar asked Aug 27 '26 07:08

Diego


1 Answers

you need to export /Users/mycomp/bin to environment variable PATH

for a session

export PATH=/Users/mycomp/bin:$PATH

for permanent, whenever you use bash

echo "export PATH=/Users/mycomp/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc

Note: And I think django automatically create executable django-admin file in the bin folder (notice there is no extensions .py) when you installed, So you should try django-admin only too.

like image 163
YOU Avatar answered Aug 29 '26 22:08

YOU



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!