python --AttributeError: partially initialized module 'copy' has no attribute 'deepcopy' (most likely due to a circular import)


遇到这个问题的时候发现网上给的解释是:
https://stackoverflow.com/questions/1250103/attributeerror-module-object-has-no-attribute

有个外国人遇到的情况如下:

Not sure how but the below change sorted my issue:

i was having the name of file and import name same for eg i had file name as emoji.py and i was trying to import emoji. But changing the name of file solved the issue .

Hope so it helps

 

是的,我当时的文件名就是copy.py,改了名字就好了,另外复制了原先的这个copy.py 文件后,copy.py 文件还在的话,依旧有这个问题,改完名字就好了。。。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM