KeyError: ‘PYTHONPATH’ when running conda commands

Had an odd error appear when I was running any conda command, see below:

$ conda update
Error in sitecustomize; set PYTHONVERBOSE for traceback:
KeyError: 'PYTHONPATH'
...

To fix do the following:
$ conda info -a | grep dirs
Error in sitecustomize; set PYTHONVERBOSE for traceback:
KeyError: 'PYTHONPATH'
user site dirs: ~/.local/lib/python3.5
$ rm -rf ~/.local/lib/python3.5

I’m no longer using Python 3.5 so I can happily remove the directory. Deleting this old lib removed the KeyError.