AttributeError: 'NoneType' object has no attribute 'loader''

Posted on Mar 25, 2022

Question

having an issue today when I started up my laptop (Ubuntu 18.4) and trying to use pip to install packages, I'm met with this error:

Error processing line 3 of /home/cjones/.local/lib/python3.6/site-packages/googleapis_common_protos-1.5.8-py3.6-nspkg.pth:

Traceback (most recent call last): File “/usr/lib/python3.6/site.py”, line 174, in addpackage exec(line) File “<string>”, line 1, in <module> File “<frozen importlib._bootstrap>”, line 568, in module_from_spec AttributeError: ‘NoneType’ object has no attribute ’loader’

Remainder of file ignored

I don't think I changed anything since last successful boot but it seems as though something is missing... can anyone help?

Answer

Delete /home/cjones/.local/lib/python3.6/site-packages/googleapis_common_protos-1.5.8-py3.6-nspkg.pth and retry.