python程序不工作apt-get install xvfb

时间:2016-07-28 07:11:14

标签: python linux python-2.7 ubuntu pycharm

我正在尝试运行我下载的程序,但它无法运行 pycharm返回以下内容

-----------------------------------------------------------------------------
Traceback (most recent call last):
  File "fb-hfc.py", line 291, in <module>
    display = Display(visible=0, size=(1600, 900))
  File "/home/apple/.local/lib/python2.7/site-    packages/pyvirtualdisplay/display.py", line 33, in __init__
    self._obj = self.display_class(
  File "/home/apple/.local/lib/python2.7/site-    packages/pyvirtualdisplay/display.py", line 51, in display_class
    cls.check_installed()
  File "/home/apple/.local/lib/python2.7/site-    packages/pyvirtualdisplay/xvfb.py", line 38, in check_installed
    ubuntu_package=PACKAGE).check_installed()
  File "/home/apple/.local/lib/python2.7/site-    packages/easyprocess/__init__.py", line 180, in check_installed
    raise EasyProcessCheckInstalledError(self)
easyprocess.EasyProcessCheckInstalledError: cmd=['Xvfb', '-help']
OSError=[Errno 2] No such file or directory
Program install error! 
You can install it in terminal:
sudo apt-get install xvfb

运行apt-get install xvfb没有帮助

应用程序是fb-hfc谷歌,如果它的代码帮助你会找到它

1 个答案:

答案 0 :(得分:0)

输入以下命令:

pip3 install pyvirtualdisplay

或此命令:

pip install pyvirtualdisplay