How to install EasyGUI on Mac OS X 10.6 (Snow Leopard)?

女生的网名这么多〃 提交于 2019-12-08 07:34:02

问题


I would like to install EasyGUI on Mac OS X 10.6, but am running into trouble. Has anyone successfully done this? If so, what explicit set of steps did you follow?

Thank you.


回答1:


It's hard to know what running into trouble means but, nonetheless, something like this seems to work on 10.6:

mkdir test_easygui
cd test_easygui
curl http://easygui.sourceforge.net/current_version/easygui_v0.93.tar.gz | tar xz
/usr/bin/python2.6 easygui.py

EDIT:

Unfortunately, the EasyGui download does not include a setup.py that would allow you to easily install it in the normal Python manner. To be a good citizen in the Python World, it should. Fortunately, it is easy to supply one. In the download directory (test_easygui in the example above), create the following text file and name it setup.py:

from distutils.core import setup
setup(name='easygui',
      version='0.93',
      py_modules=['easygui'],
     )

Then run the following command:

sudo /usr/bin/python2.6 setup.py install

Now you should be able to run the demo from any directory by:

/usr/bin/python2.6 -m easygui

and you should be able to just import easygui in your own python modules. By the way, this process should work on any supported python platform (not just OS X) and with any supported python interpreter you have installed: just substitute the proper path for /usr/bin/python2.6. (If you don't have any extra pythons installed on OS X 10.6, typing just python should be sufficient.)



来源:https://stackoverflow.com/questions/1785987/how-to-install-easygui-on-mac-os-x-10-6-snow-leopard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!