# pip install twython to get this library from twython import Twython # Create a new App at https://dev.twitter.com/, check off "sign in via Twitter", and get your tokens there twitter = Twython('Consumer API Key', 'Consumer API Secret', 'Access Token', 'Access Token Secret') # Read and upload the image, see image guidelines in post above~ image = open('path/to/image.png', 'rb') twitter.update_profile_image(image=image)