Try this:
try:
from Tkinter import *
except ImportError:
from tkinter import *
#Note that you don't have to import tkinter as tk after you have used from tkinter import *
master=Tk() #you don't have to type tk.Tk() because you have imported all of tkinter's
#commands in your main script
def myScrollcmd(event): #You need to bind this function to your canvas so that your scroll
#bar works
mycanvas.config(scrollregion=mycanvas.bbox('all'))
mycanvas = Canvas(master)
mycanvas.pack(fill=BOTH, expand=True)
myFrame = Frame(mycanvas)
mycanvas.create_window((0, 0), window=myFrame, anchor=NW)
myScrollbar = Scrollbar(mycanvas, orient=VERTICAL, command=mycanvas.yview)
myScrollbar.pack(side=RIGHT, fill=Y)
mycanvas.config(yscrollcommand=myScrollbar.set)
mycanvas.bind("<Configure>", myScrollcmd)
for x in range(100):
Label(myFrame, text="Text "+str(x)).pack()
master.mainloop()
This works for me. I use Python 3. It should work for you as well. If not, please read the documentation and search the internet for valid tkinter commands that work with your version of python. Your code will be similar to this but you will have to modify my code to satisfy your needs.
Good luck