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.
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 .
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.
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.
By default you have to use admin and the password is 123123.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With