Google Colab与tkinter一起挂起python模块

问题描述

我已经尝试通过google colab笔记本测试Deaf Communicator GitHub project,如您在此处看到的: https://colab.research.google.com/drive/1LdZEEuwKkIHfydVI3lhMfk1QjWbHDUb7?usp=sharing

image

此GitHub项目需要tkinter python混乱,并且基于 this post,我尝试使用以下代码修复tkinter模块的colab问题,但问题在于它挂在运行以下命令上:

!apt-get install -y xvfb # Install X Virtual Frame Buffer
import os
os.system('Xvfb :1 -screen 0 1600x1200x16  &')    # create virtual display with size 1600x1200 and 16 bit color. Color can be changed to 24 or 8
os.environ['disPLAY']=':1.0'    # tell X clients to use our virtual disPLAY :1.0
%cd /content/deaf-communicator
!python -m DEAF.py

结果如下:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  xvfb
0 upgraded,1 newly installed,0 to remove and 21 not upgraded.
Need to get 783 kB of archives.
After this operation,2,266 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 xvfb amd64 2:1.19.6-1ubuntu4.7 [783 kB]
Fetched 783 kB in 1s (1,117 kB/s)
Selecting prevIoUsly unselected package xvfb.
(Reading database ... 144655 files and directories currently installed.)
Preparing to unpack .../xvfb_2%3a1.19.6-1ubuntu4.7_amd64.deb ...
Unpacking xvfb (2:1.19.6-1ubuntu4.7) ...
Setting up xvfb (2:1.19.6-1ubuntu4.7) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
/content/deaf-communicator

image

因此,如果可能,请查看它以修复该错误。 还问这里: https://github.com/shubham-thakare/deaf-communicator/issues/1

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...