Logged in as a root user, first list all available python alternatives: # update-alternatives -list python 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
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |