Tkinter with Anacaonda

7 views
Skip to first unread message

j.hor...@gmail.com

unread,
Jan 16, 2016, 1:43:52 PM1/16/16
to Anaconda - Public
 I was wondering how I might install Tkinter with my Anaconda. I am using python v. 3.5.1., python build 0.  With the presumably default 149 installed packages.

Ian Stokes Rees

unread,
Jan 16, 2016, 3:41:29 PM1/16/16
to anac...@continuum.io

On 1/16/16 1:43 PM, j.hor...@gmail.com wrote:

 I was wondering how I might install Tkinter with my Anaconda. I am using python v. 3.5.1., python build 0.  With the presumably default 149 installed packages.

AFAICT it is part of the standard Anaconda distribution (2.4.1, from a few weeks ago) based on Python 3.5. I don’t know much about Tk, however I believe that in Python 2.7 you needed to do:

import Tkinter

whereas in Python 3.5 the package was renamed to the more pythonic tkinter so you would instead do:

import tkinter

In both cases the the conda package name is simply tk (all lower case). You can check if you have it installed by doing:

$ conda list | grep -i -e tk

and if it isn’t installed then the following should rectify things:

$ conda install tk

HTH

Ian

vladnus...@gmail.com

unread,
Feb 15, 2018, 4:45:58 PM2/15/18
to Anaconda - Public, j.hor...@gmail.com


I am execute the simple script to rump up the tk window. But nothing happens.
There are no import errors, but window is not generated too :(

#!/tools/common/pkgs/anaconda/current/bin/python3.5


import sys
import os
import shutil


from tkinter import *
window = Tk()
label = Label(window, text="This is our label.")
label.pack()



суббота, 16 января 2016 г., 20:43:52 UTC+2 пользователь j.hor...@gmail.com написал:

Ray Donnelly

unread,
Feb 15, 2018, 5:23:38 PM2/15/18
to Anaconda - Public, j.hor...@gmail.com
Which OS are you using?

--
Community Discussion Forum for Anaconda
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.

grover...@gmail.com

unread,
Jun 1, 2018, 3:09:27 PM6/1/18
to Anaconda - Public, j.hor...@gmail.com
Hello, 
I hope its not too late to ask for help. Actually i am facing the same error,
I am using windows 7 and Anaconda2.
first of all anaconda does notrecognize from Tkinter import *
I had to use import Tkinter as tk. 
After that i tried executing the script to produce and empty window but no window appeared even though the script executed perfectly fine without errors,
Here is the code snippet for better understanding:-

import Tkinter as tk
a=tk.Tk()
a.title("my first window")

On Friday, February 16, 2018 at 3:53:38 AM UTC+5:30, Ray Donnelly wrote:
Which OS are you using?
On Thu, Feb 15, 2018 at 2:05 PM, <vladnus...@gmail.com> wrote:


I am execute the simple script to rump up the tk window. But nothing happens.
There are no import errors, but window is not generated too :(

#!/tools/common/pkgs/anaconda/current/bin/python3.5


import sys
import os
import shutil


from tkinter import *
window = Tk()
label = Label(window, text="This is our label.")
label.pack()



суббота, 16 января 2016 г., 20:43:52 UTC+2 пользователь j.hor...@gmail.com написал:
 I was wondering how I might install Tkinter with my Anaconda. I am using python v. 3.5.1., python build 0.  With the presumably default 149 installed packages.

--
Community Discussion Forum for Anaconda
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+u...@continuum.io.

grover...@gmail.com

unread,
Jun 1, 2018, 3:32:18 PM6/1/18
to Anaconda - Public, j.hor...@gmail.com
Hello, 
I hope its not too late to ask for help. Actually i am facing the same error,
I am using windows 7 and Anaconda2.
first of all anaconda does notrecognize from Tkinter import *
I had to use import Tkinter as tk. 
After that i tried executing the script to produce and empty window but no window appeared even though the script executed perfectly fine without errors,
Here is the code snippet for better understanding:-

import Tkinter as tk
a=tk.Tk()
a.title("my first window")

On Friday, February 16, 2018 at 3:53:38 AM UTC+5:30, Ray Donnelly wrote:
Which OS are you using?
On Thu, Feb 15, 2018 at 2:05 PM, <vladnus...@gmail.com> wrote:


I am execute the simple script to rump up the tk window. But nothing happens.
There are no import errors, but window is not generated too :(

#!/tools/common/pkgs/anaconda/current/bin/python3.5


import sys
import os
import shutil


from tkinter import *
window = Tk()
label = Label(window, text="This is our label.")
label.pack()



суббота, 16 января 2016 г., 20:43:52 UTC+2 пользователь j.hor...@gmail.com написал:
 I was wondering how I might install Tkinter with my Anaconda. I am using python v. 3.5.1., python build 0.  With the presumably default 149 installed packages.

--
Community Discussion Forum for Anaconda
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+u...@continuum.io.

nikhi...@gmail.com

unread,
Jun 19, 2018, 12:01:53 PM6/19/18
to Anaconda - Public, j.hor...@gmail.com
Hey Jay,

Just add this line to your program and window will appear ( 'a' is the name of your window)
a.mainloop() 

<<Embedded Text>>
Reply all
Reply to author
Forward
0 new messages