How do I check the version of boto3 I am running?
I tried going into REPL and running these commands:
>>> import boto3
>>> boto3.Version
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'boto3' has no attribute 'Version'
Boto3 was built from the ground up with native support for Python 3 in mind. With each build, it is fully tested with Python versions 3.4, 3.3, 2.7, and 2.6.
I know this is late but you can also use:
pip show boto3
You can always use dir function to know all the properties and methods of object.
dir(boto3)
['DEFAULT_SESSION', 'NullHandler', 'Session', '__author__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '_get_default_session', 'client', 'docs', 'exceptions', 'logging', 'resource', 'resources', 'session', 'set_stream_logger', 'setup_default_session', 'utils']
From this output you can see __version__
.
boto3.__version__
Try using .__version__
or .version
PEP 8 standard is to use the __version__
attribute for this, however it is worth noting that some modules implement version
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With