0 votes
1 view
in Python by (9.3k points)

I was attempting to set the default python variant to python3 in Ubuntu 16.04. As a matter of course, it is python2 (2.7). I followed the underneath steps : 

update-alternatives --remove python /usr/bin/python2

update-alternatives --install /usr/bin/python python /usr/bin/python3

however, I'm getting the accompanying blunder for the subsequent assertion, 

[email protected]:~$ update-alternatives --install /usr/bin/python python /usr/bin/python3

update-alternatives: --install needs <link> <name> <path> <priority>

Use 'update-alternatives --help' for program usage information.   

I'm new to Ubuntu and I don't have the foggiest idea what I'm fouling up. 

1 Answer

0 votes
by (19.2k points)

I Suggest, update-alternatives is the better method to do this. 

Open your .bashrc document nano ~/.bashrc. Type alias python=python3 onto another line at the highest point of the document at that point spare the record with ctrl+o and close the document with ctrl+x. At that point, back at your order line type source ~/.bashrc. Presently your assumed name should be lasting.

Want to learn python in detail? Join python online course now!
For more details, do check it out..
Welcome to Intellipaat Community. Get your technical queries answered by top developers !