Ich bekomme Python 2.7 beim Ausführen von Sudo. Ich habe versucht, meine .bash_profile und .bashrc von meinem ursprünglichen Benutzer und root zu ändern, aber ohne Erfolg.Sudo Python falsche Version
$ python
Python 3.5.2 (default, Oct 11 2016, 05:05:28)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D
$ sudo python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Ich habe alias python='python3'
in beiden bash configs in Benutzern und bezogen sie.
Wie bekomme ich Python 3.5 mit sudo python
laden?
EDIT: Dies ist auf OSX EDIT2: Ich habe auch versucht, Blick auf which
Python.
$ which python
/usr/bin/python
$ sudo which python
/usr/bin/python
versuchen Sie run env | grep PATH und sudo env | grep PATH siehe Ausgabe – Tyler