Python embeddable zip: install Tkinter

≯℡__Kan透↙ 提交于 2019-12-04 20:24:57

问题


Python embeddable zip comes without pip and Tkinter.
It is easy to install pip with get-pip.py in the embeddable zip.

How can we install Tkinter too (assuming we do not have an existing Python installation in the same machine)?


回答1:


Assuming you are on Windows and you also have a regular Python distribution installed (same version of the embedded distribution), to install Tkinter in the embedded distribution you can copy the following files from the regular Python distribution:

  • tcl folder to embedded_distribution_folder\ (root folder of the embedded distribution)
  • tkinter folder (which is under Lib) either to embedded_distribution_folder\Lib or to embedded_distribution_folder\
  • files _tkinter.pyd tcl86t.dll tk86t.dll (which are under DLLs) either to embedded_distribution_folder\DLLs or to embedded_distribution_folder\


来源:https://stackoverflow.com/questions/37710205/python-embeddable-zip-install-tkinter

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