从S3库导入S3
我的Python 3.8环境上安装了S3库
使用 pip安装S3
在
我
。
但是我会遇到一个错误,
Traceback (most recent call last):
File "testing.py", line 1, in <module>
from s3 import S3
File "/usr/local/lib/python3.8/dist-packages/s3/__init__.py", line 1, in <module>
from .s3 import *
File "/usr/local/lib/python3.8/dist-packages/s3/s3.py", line 253
except Exception, e:
^
SyntaxError: invalid syntax
看起来图书馆是用Python 2语法编写的。有没有办法解决这个问题?我想在Python 3.8环境中使用S3库。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用boto3代替S3。它是与Python3兼容的官方亚马逊库 - 。
仅供参考,S3是一个开放源项目,它似乎不再使用在2015年的最后一个版本< /a>,可能永远不应该使用它。
Use boto3 instead of s3. It is the official amazon library that is compatible with python3 - https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-examples.html.
FYI, s3 is an opensource contribution project and it doesn't seem to be maintained anymore with the last release in 2015, probably should never be using it.