import asyncio
from telethon import TelegramClient
from telethon.tl.functions.photos import UploadProfilePhotoRequest
# Use your own values from my.telegram.org
api_id = 12345
api_hash = '0123456789abcdef0123456789abcdef'
client = await TelegramClient('anon', api_id, api_hash)
await client(UploadProfilePhotoRequest(
await client.upload_file('/path/to/some/file')
))