Question: How do you create a **hyperlink** using a `Label` in Tkinter?

A quick search did not reveal how to do this. Instead there were only solutions to create a hyperlink in a `Text` widget.

Answer: 
Bind the label to `"<Button-1>"` event. When it is raised the `callback` is executed resulting in a new page opening in your default browser. 

```
from tkinter import *
import webbrowser

def callback(url):
    webbrowser.open_new(url)

root = Tk()
link1 = Label(root, text="Google Hyperlink", fg="blue", cursor="hand2")
link1.pack()
link1.bind("<Button-1>", lambda e: callback("http://www.google.com"))

link2 = Label(root, text="Ecosia Hyperlink", fg="blue", cursor="hand2")
link2.pack()
link2.bind("<Button-1>", lambda e: callback("http://www.ecosia.org"))

root.mainloop()

```

You can also open files by changing the callback to: 

```
webbrowser.open_new(r"file://c:\test\test.csv")

```
Alternatively if you have multiple labels and want the one function for all. That is assuming you have the link as the text

```
import tkinter as tk
import webbrowser

def callback(event):
    webbrowser.open_new(event.widget.cget("text"))

root = tk.Tk()
lbl = tk.Label(root, text=r"http://www.google.com", fg="blue", cursor="hand2")
lbl.pack()
lbl.bind("<Button-1>", callback)
root.mainloop()

```