Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installed Django but django-admin is not found

Tags:

django-admin

I just installed django using pip but when I try to create a new project using django-admin I get "bash: django-admin: command not found". I tried installing django in a virtualenv but I'm still getting the same error when trying to create a new project.

While I was trying to solve this issue I found this: Installing Django with pip, django-admin not found

The last answer is saying that django-admin may not be on the path. Can anyone explain me please what does this mean?

If I run "find / -name django-admin.py" I get this:

/home/user/.local/bin/django-admin.py
/home/user/.local/lib/python3.5/site-packages/django/bin/django-admin.py
/home/user/django-admin.py

Can anyone give me some help please? Thank you.

like image 766
raa95 Avatar asked Jan 20 '18 22:01

raa95


People also ask

Why is Django-admin command not found?

command not found: django-admin django-admin should be on your system path if you installed Django via pip . If it's not in your path, ensure you have your virtual environment activated and you can try running the equivalent command python -m django .

How do I find my Django-admin?

Run django-admin help to display usage information and a list of the commands provided by each application. Run django-admin help --commands to display a list of all available commands. Run django-admin help <command> to display a description of the given command and a list of its available options.

How do I download Django-admin?

Django can be installed easily using pip . In the command prompt, execute the following command: pip install django . This will download and install Django. After the installation has completed, you can verify your Django installation by executing django-admin --version in the command prompt.

What is the default username and password for Django-admin?

By default you have to use admin and the password is 123123.


1 Answers

You have installed Django using your account instead of sudo

so do the following to resolve this

$ pip3 uninstall django

$ sudo pip3 install django

This is the output

$which django-admin
/usr/local/bin/django-admin
like image 149
Rizwan Saeed Avatar answered Sep 28 '22 18:09

Rizwan Saeed



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!