我使用 Pycharm 并安装了 boto3 包并尝试导入 boto3 并得到属性错误。 Python.exe 文件路径在项目解释器中给出
import boto3
s3 = boto3.resource('s3')
AttributeError:部分初始化的模块“boto3”没有属性“资源”(很可能是由于循环导入)
但是在 Python shell 中工作的相同代码
最佳答案
我猜是因为我尝试时您的文件名,重命名文件名时出现同样的错误。我能够成功运行文件
关于pycharm - 属性错误 : partially initialized module 'boto3' has no attribute 'resource' (most likely due to a circular import),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61711799/