Search code examples
pythonpippython-module

Can not install modules - AttributeError: 'NoneType' object has no attribute 'loader'


When trying to use pip or python from windows CMD, it throws me this warning:

Error processing line 1 of c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\protobuf-3.7.0-py3.7-nspkg.pth:
Traceback (most recent call last):
    File "c:\users\james\appdata\local\programs\python\python37-32\lib\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'

Remainder of file ignored

Other python scripts generally run fine. However, when trying to install SpaCy, this error is fatal, and the package can not be installed

I have tried reinstalling pip and python, and attempting to repair them from windows settings, with so success as of yet. Even just attempting to install pre-compiled binaries fails!

Even just typing pip into command prompt returns the same warning!

If anyone knows how to prevent this error, or find a workaround for installing packages, all answers are appreciated


Solution

  • You can try to use lower char for installing package or it may be error of package try any other version