且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在我的Docker映像中安装python-tk

更新时间:2023-11-24 20:22:22

未安装该软件包但由于缺少显示而无法运行,这可能不是问题.

It is probably not a problem with the package not being installed but rather not running because of lack of display.

为了方便起见,我将粘贴代码来做到这一点:

For convenience I'm pasting the code how to do that:

docker run -ti -e DISPLAY = $ DISPLAY blah-image blah命令

docker run -ti -e DISPLAY=$DISPLAY blah-image blah-command

从这里提取: Docker中的PythonTkinter.TclError:无法连接到显示