其他分享
首页 > 其他分享> > 解决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...

作者:互联网

解决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文件重名了,在这里插入图片描述

需要更改。解决!!!

标签:...,name,XXX,likely,module,wordcloud,initialized,import
来源: https://blog.csdn.net/weixin_44840774/article/details/111187887