python : Change default 2.x version to 3.x in Linux
To open python 3x
python3
To install packages
pip3 install <package>
To change default
$python --verion
Python 2.4
# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode
# update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2
update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode
$python --verionPython3.6
#select versions
update-alternatives --config python
No comments:
Post a Comment