easyprocess.EasyProcessCheckInstalledError: cmd=['Xvfb', '-help'] OSError=[Errno 2] No such file or directory

霸气de小男生 提交于 2019-11-30 01:10:36

问题


I'm trying to setup a display but it's telling me 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!

回答1:


You likely need to install either the xvfb package, or possibly the xvfbwrapper:

First check and see if xvfb is installed:

Xvfb -help

If the command is not found then you can usually install the xvfb package with the following command (or whichever package manager you generally use):

sudo apt-get install xvfb

xvfbwrapper is Python wrapper for running a display inside X virtual framebuffer (Xvfb).

You can install it with:

pip install xvfbwrapper

The error you are getting seems to be a result of either the command or module not being found.




回答2:


I encountered this error on a Mac and (finally) solved it by install Xquartz: https://www.xquartz.org/ (reboot after install!)



来源:https://stackoverflow.com/questions/32173839/easyprocess-easyprocesscheckinstallederror-cmd-xvfb-help-oserror-errno

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