解决cannot import name ‘XXX‘ from partially initialized module ‘XXX‘ (most likely due to a circular...

解决cannot import name ‘XXX’ from partially initialized module ‘XXX’ (most likely due to a circular import)

今天新建了一个wordcloud.py文件想练习一下画个云图,随后运行发现出现错误:cannot import name ‘WordCloud’ from partially initialized module ‘wordcloud’ (most likely due to a circular import),翻译一下:不能从部分初始化的模块“WordCloud”导入名称“WordCloud”(很可能是由于循环导入)在这里插入图片描述

原来是因为导入的wordcloud包和新建的wordcloud.py文件重名了,在这里插入图片描述

需要更改。解决!!!

你可能感兴趣的:(Python爬虫)