# Using IDLE and using



## Funkey (Jan 31, 2014)

I have FreeBSD 9.2 installed and am just using the command line through terminal. I would like to run IDLE for Python from the command line. When I type in the command `$idle.` I get " IDLE can't import Tkinter.  Your Python may not be configured for Tk. **" Does this mean that I have to install a GUI to be able to use IDLE? Or is there some way that I can install Tkinter and use it from the command line?  I looked in /usr/ports/ and could find no listing for Tinker.  

Any help for this?  

Thanks


----------



## Carpetsmoker (Jan 31, 2014)

On FreeBSD, TKinter is *not* part of the default Python install, since it requires TCL & TK as dependencies (which also pulls in X11), which is considered undesired.

You can install the TKinter module as x11-toolkits/py-tkinter.

Bonus tip:
I find ports-mgmt/psearch a very useful tool for searching ports:

```
[~]% psearch tkinter
devel/pypersrc            Python/Tkinter based source browser
graphics/py-editobj       Create and display a Tkinter dialog box for editing any Python object
x11-toolkits/py-tkinter   Python bindings to the Tk widget set
x11-toolkits/py31-tkinter Python bindings to the Tk widget set
```



> Does this mean that I have to install a GUI to be able to use IDLE? Or is there some way that I can install Tkinter and use it from the command line?



TKinter is a graphical toolkit, and IDLE is a graphical IDE. So, obviously, you can't run it as a terminal-based app.


----------



## Funkey (Jan 31, 2014)

Thanks @Carpetsmoker.


----------

