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 文件还在的话,依旧有这个问题,改完名字就好了。。。