easyprocess.EasyProcessCheckInstalledError:cmd = ['Xvfb',' - help'] OSError = [Errno 2]没有这样的文件或目录

时间:2015-08-24 02:51:59

标签: python centos xvfb pyvirtualdisplay

我正在尝试设置一个显示器,但它告诉我No such file or directory

Traceback (most recent call last):
  File "/var/www/envs/venv/proj/scripts/my_file.py", line 44, in click
    display = Display(visible=0, size=(800,600))
  File "/usr/lib/python2.6/site-packages/pyvirtualdisplay/display.py", line 33, in __init__
    self._obj = self.display_class(
  File "/usr/lib/python2.6/site-packages/pyvirtualdisplay/display.py", line 51, in display_class
    cls.check_installed()
  File "/usr/lib/python2.6/site-packages/pyvirtualdisplay/xvfb.py", line 38, in check_installed
    ubuntu_package=PACKAGE).check_installed()
  File "/usr/lib/python2.6/site-packages/easyprocess/__init__.py", line 209, in check_installed
    raise EasyProcessCheckInstalledError(self)
easyprocess.EasyProcessCheckInstalledError: cmd=['Xvfb', '-help']
OSError=[Errno 2] No such file or directory
Program install error!

2 个答案:

答案 0 :(得分:24)

您可能需要安装writer.WriteLine(string.Format("PRIVMSG {0} :{1}", CHANNEL, "Welcome back!")); writer.Flush(); 软件包,或者可能需要安装xvfb

首先检查并查看是否安装了xvfb

xvfbwrapper

如果命令找不到,那么通常可以使用以下命令(或您通常使用的软件包管理器)安装Xvfb -help 软件包:

xvfb

xvfbwrapper是用于在X虚拟帧缓冲区(Xvfb)内运行显示的Python包装器。

您可以使用以下方式安装:

sudo apt-get install xvfb

您获得的错误似乎是由于找不到命令或模块。

答案 1 :(得分:2)

我在Mac上遇到此错误,并且(最后)通过安装Xquartz解决了它:https://www.xquartz.org/(安装后重新启动!)