I was running into a problem while trying to install anaconda and python 3.7 on MacOS. After I installed anaconda, every time I open my Terminal, the following message shows up:
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
File "/Users/s/anaconda3/lib/python3.7/site.py", line 570, in <module>
main()
File "/Users/s/anaconda3/lib/python3.7/site.py", line 563, in main
execsitecustomize()
File "/Users/s/anaconda3/lib/python3.7/site.py", line 502, in execsitecustomize
import sitecustomize
File "/usr/local/lib/python2.7/site-packages/sitecustomize.py", line 16, in <module>
' You should `unset PYTHONPATH` to fix this.')
File "/Users/s/anaconda3/lib/python3.7/_sitebuiltins.py", line 26, in __call__
raise SystemExit(code)
SystemExit: Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python 3.x!
PYTHONPATH is currently: "/usr/local/lib/python2.7/site-packages:"
You should `unset PYTHONPATH` to fix this.
Of course I tried to unset the PYTHONPATH, but it doesn't work: every time I open up the Terminal again, the messages appears again. Can anyone help me with this issue?
Thank you for your help