I am trying to use update-alternatives
to assign python 3.6
; Instead it is using python 3.52
.
update-alternatives --install /usr/bin/python python /usr/bin/python3 1
Any idea what I have to do differently?
I am following this guide. Python 3.6 was released since it was prepared. I have been unable to achieve this result.
python 3.6.x doesn't come packaged in Ubuntu Xenial release by default (I'm assuming you have Ubuntu 16.04 installed on your machine because you have tagged 16.04 in the question). In Ubuntu 16.04 by default one gets python2.7.12 and python3.5.2
Ubuntu 16.04 provides these two by default and are stable. Even the guide that you have mentioned uses Python3.5.2 and not Python3.6.x
Anyhow if you insist on using 3.6.x, there are three ways to go about it:
You can install Ubuntu 17.10, which by default provides python 3.6.x (I don't recommend this as 17.10 is not LTS)
Or
install it from alternative ppas. See here
Or
You can also compile it from source: visit python3 sources and download source tarball of whichever python3 version you prefer. Once downloaded you can follow: (I'm assuming python3.6.4 here)
And then use update-alternatives as mentioned in the aforementioned guide (the one you posted in the question); you can also modify the python3 alias to point to Python3.6.x (whichever version you've installed) although I deplore it immensely.
Frankly speaking, I don't see an explicit need to use python 3.6.x for Django (I'm a Django dev myself). Python 3.5.2 should suffice.
Happy coding!