To change python version system-wide we can use update-alternatives python command. ~/.bashrcĬheck your default python version: $ python -versionĬhange python version system-wide with update-alternatives python Once you make the above change, re-login or source your. Open ~/.bashrc file and add new alias to change your default python executable: alias python='/usr/bin/python3.4' To change a python version on per user basis you simply create an alias within user’s home directory. If that command doesn’t work, try with python3 command instead: $ python3 -version $ – requires given linux commands to be executed as a regular non-privileged user # – 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 your Linux system as root or via the sudo command. Requirements, Conventions or Software Version Used How to change from default to alternative Python version on Debian Linux Software Requirements and Linux Command Line Conventions Category How to install multiple python versions. In this tutorial, you will see how to install multiple versions of python, and change the python version on Debian using the update-alternatives python command. Your Debian Linux installation may include multiple python versions and thus also include multiple python binary executables, and it’s possible to change python version that the system is using.
0 Comments
Leave a Reply. |