When I type echo $PYTHONPATH I get
/usr/lib/python3.6
But when I type python as user root I get
File "/usr/lib/python3.6/site.py", line 183
file=sys.stderr)
^
SyntaxError: invalid syntax
What is the reason for this error ?
When I type python3.6 I get no errors. If this question needs to be moved to UNIX SE please let me know.
python
on Ubuntu 18.04 is stillpython2.7
- the error suggests you're executingpython2
with aPYTHONPATH
that's only appropriate forpython3
PYTHONPATH
as/usr/lib/python3.6
?