0

I am trying to run a simple calculator code in Tkinter, which I found on the web linked here. The code uses the import button functions, which gives an

ImportError: No module named button

I understand that I may be missing a package called button. I tried searching but couldn't find anything for my win-64 system. I tried

> anaconda search -t conda button

and

> pip install 'packages'

all the available packages but doesn't seem to work.

Please, can anyone tell me what am I missing? Thank you.

SamAct
  • 529
  • 4
  • 23
  • What does *"doesn't seem to work"* actually mean? Did you `pip install buttons`? What precise output did you get as a result? There is no such package on PyPI, perhaps it refers to http://mcsp.wartburg.edu/zelle/python/ppics1/code/chapter12/button.py – jonrsharpe Jul 01 '16 at 08:23
  • @jonrsharpe by "_doesn't seem to work_" I mean I am getting the ImportError. And `pip install` returns no matching distribution. – SamAct Jul 01 '16 at 08:28
  • Also, you might want to check [Importing Self Written Python Module](http://stackoverflow.com/questions/32509046/importing-self-written-python-module) – Lafexlos Jul 01 '16 at 08:30
  • @Lafexlos are you saying the button isn't any package but it is a function defined inside the code? – SamAct Jul 01 '16 at 08:36
  • It is not on PyPI, so you can't `pip install` it. I suggest you take a look at http://mcsp.wartburg.edu/zelle/python/. You will have to download the relevant `.py` files and put them somewhere you can `import` from. – jonrsharpe Jul 01 '16 at 08:38
  • @jonrsharpe Zelle's website has only _graphics.py_ module that I have saved it in my working directory and is working fine. – SamAct Jul 01 '16 at 08:42
  • No, there are others - see the link in my first comment, from the same site. – jonrsharpe Jul 01 '16 at 08:43
  • @jonrsharpe Thanks buddy problem solved. – SamAct Jul 01 '16 at 08:45
  • why does this have the `tkinter` tag? It seems completely unrelated to tkinter. – Bryan Oakley Jul 01 '16 at 13:00

0 Answers0