简体   繁体   中英

Broken Update Conda : AttributeError: 'NoneType' object has no attribute 'loader' for matplotlib

There was some error while updating the packages and since then the error keeps coming up with every single conda command.

python3
Error processing line 1 of /home/deshwal/anaconda3/lib/python3.7/site-packages/matplotlib-3.1.3-py3.7-nspkg.pth:

  Traceback (most recent call last):
    File "/home/deshwal/anaconda3/lib/python3.7/site.py", line 168, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "<frozen importlib._bootstrap>", line 580, in module_from_spec
  AttributeError: 'NoneType' object has no attribute 'loader'

Error disappeared when I deleted the file `

matplotlib-3.1.3-py3.7-nspkg.pth:

but I can not import matplotlib in any case. I have used conda install -f matplotlib but doesn't seem to work in my case.

I had a similar problem and solved it by deleting the file:

rm /home/deshwal/anaconda3/lib/python3.7/site-packages/matplotlib-3.1.3-py3.7-nspkg.pth

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM