Lots of other threads about similar issues, but none that I could find where quite the same case as mine. So, here goes:
Things I did:
I don't know if it's relevant to anyone but I got this error while editing ~/.zshrc
while virtualenv being active. So I had to deactivate
and then rmvirtualenv env_name
to remove the errors. And then I recreated the env: mkvirtaulenv env_name
and workon env_name
and this time I got no errors.
Hope it helps someone.