import piexif
from PIL import Image
# Read Image
fname = 'Wide.JPG'
img = Image.open(fname)
exif_dict = {"GPS":{}}
exif_dict['GPS'][piexif.GPSIFD.GPSLongitude] = ((180, 1), (17, 1), (532029, 1))
exif_dict['GPS'][piexif.GPSIFD.GPSLatitude] = ((180, 1), (17, 1), (532029, 1))
exif_dict['GPS'][piexif.GPSIFD.GPSAltitude] = ((200,1))
# Save image with modified exif data
exif_bytes = piexif.dump(exif_dict)
img.save('1_copy.JPG', exif=exif_bytes)