Hello everybody reading this message,
Since I set PYTHONPATH on my desktop, whenever I try to use commands like gdb, or yum, which I think not related to python, I have this "SyntaxError: invalid syntax" slapping my face. I have tried several thing to debug the shell prompt, to figure out what the heck was going on, but so far I stucked with this problem.
I goes like this:
[charly@sn04 ~]$ gdb
File "/opt/anaconda3/lib/python3.5/site.py", line 176
file=sys.stderr)
^
SyntaxError: invalid syntax
This seems to be related to PYTHONPATH. When I unset this, everything works fine.
My PYTHONPATH:
export PYTHONPATH=/opt/anaconda3/lib/python3.5/
I have tried to debug the shell with -x and -v, but the debug information is not helpful:
[charly@sn04 ~]$ gdb
gdb
+ gdb
File "/opt/anaconda3/lib/python3.5/site.py", line 176
file=sys.stderr)
^
SyntaxError: invalid syntax
I tried as well to set a trap:
trap "PARENT_COMMAND=\"$(ps -o comm= $PPID)\"" ERR
[charly@sn04 ~]$ gdb
gdb
+ gdb
File "/opt/anaconda3/lib/python3.5/site.py", line 176
file=sys.stderr)
^
SyntaxError: invalid syntax
PARENT_COMMAND="xterm"
++ PARENT_COMMAND=xterm
, to see which process was calling this error, but so far I was unable to figure out how to solve this problem.
Thank you in advance for any clue or hint.