![]() ![]() Update-alternatives: using /usr/bin/python3.5 to provide /usr/bin/python (python) in auto mode # update-alternatives -install /usr/bin/python python /usr/bin/python3.5 2 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/python2.7 1 In our case with stick with /usr/bin/python2.7 and /usr/bin/python3.5 versions: Next, update the Python alternatives list for each version you whish to use. usr/bin/python /usr/bin/python2 /usr/bin/python2.7 /usr/bin/python3 /usr/bin/python3.5 /usr/bin/python3.5m /usr/bin/python3m To install Python alternatives, first list all available options: Update-alternatives: error: no alternatives for python At first the update-alternatives command will complain that there are no python alternatives available: To perform a system-wide switch between default python versions use update-alternatives command. Hence, we can start by installation of both python versions:Īfter installation the Python version 2.7 is made default: Let’s assume that no python interpreter is not yet installed on our system. To check a default python version simply run python command and query its version: ![]() If you have not installed any python package yet you can choose between both by simply installing an appropriate package: $ – requires given linux commands to be executed as a regular non-privileged userĭebian 9 Stretch comes with two 2.7 and 3.5 python versions.# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command.Privileged access to to your Debian Linux installation will be required. This article explains how to switch between Python2 and Python3 on Debian 9 Stretch Linux Operating System and Software Versions ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |