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