我必须安装模块“ google”,然后由于错误,在读取SO答案后,我必须手动将其卸载。从那时起,我无法导入bs4。它总是给我以下错误:
Error processing line 3 of /usr/local/lib/python3.6/dist-packages/googleapis_common_protos-1.5.3-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
我在ubuntu 17.10中使用Python 3。
我的意见是,您的软件包unistall未能正确完成,并且该google软件包中的某些内容被遗忘了。
在您的位置,我将尝试移动该文件:googleapis_common_protos-1.5.3-nspkg.pth(将其暂时放置在其他地方),然后查看您的导入模块是否有效,在这种情况下,请删除该文件。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句