Last active
August 18, 2018 20:45
-
-
Save milkpirate/5a9e325dfe5b038c21511c415dab9450 to your computer and use it in GitHub Desktop.
Force apt(-get) files to be executed with python2 - useful for debian, if you set e.g. python3 as system default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/share/python/debpython/ | |
\ls /usr/share/python/debpython/*.py | xargs sed -i.bak '1s|^|#!/usr/bin/env python2\n|' | |
cd /usr/bin/pycompile | |
\ls /usr/bin/pycompile | xargs sed -i '1s|^|#!/usr/bin/env python2\n|' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment