Comments on How to Install Django on Ubuntu 18.04 LTS
Django is a web application framework written in python that follows the MVC (Model-View-Controller) architecture, it is available for free and released under an open source license. In this tutorial, we will install Django 2.0.5 stable version on an Ubuntu 18.04 LTS server.
11 Comment(s)
Comments
Using update-alternatives lead to some issues down the road for me that if I had been thinking ahead I would have anticipated. Don't use update-alternatives! Python2 and Python3 are not interchangable alternatives. Instead just create an alias:Create file ~/.bash_aliases and place this into it:--------------------------alias python=python3--------------------------Then open ~/.bashrc and make sure that the following is uncommented:-------------------------- if [ -f ~/.bash_aliases ]; then. ~/.bash_aliasesfi--------------------------
Then run the following command:
source ~/.bash_aliases or source ~/.bashrcCheck to make sure it worked by running python --version ... it should return the installed version for Python 3
Thanks a lot so simple and to the point.
This is more simple:
sudo apt install python-django
sudo apt install python3-django
Thank you!
i've done everthing successfully but my ip address is not working on any of my browser
kindly help
Did you change the example url? The 192.168.10.100 should be changed to whatever your ip address is (ifconfig-my wireless is assigned wlp2s0: inet 192.168.1.12, which is my 'local network' ip).
Thank you md. arul
The mac came with python 2.7 and I recently also installed 3.7. I was told not to remove 2.7 as the mac uses it for some other processes. When I followed this and installed Django 2.2, I ended up with 1.1 paired with python 2.7. I also Alias python='python3' to make sure it always runs, but I don't think that did it. Any ideas?
So simple. Thank u so much Arul. You saved my time.
You should have to use ur system if for its proper working
Good working for me but , how to deactivate virtual environment.
Thank you very much for your valuable information & appreciate you for your hard work. Keep it up bro.