Google Colab与tkinter一起挂起(python模块)

时间:2020-10-28 16:54:04

标签: python tkinter colab

我已经尝试通过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

谢谢。

0 个答案:

没有答案