问题描述
我正在尝试设置显示器,但告诉我没有这样的文件或目录
。
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!
推荐答案
您可能需要安装 xvfb
包,或者 xvfbwrapper
:
You likely need to install either the xvfb
package, or possibly the xvfbwrapper
:
首先检查是否已安装:
Xvfb -help
如果未找到命令 ,那么通常可以使用以下命令(或通常使用的任一软件包管理器)安装 xvfb
软件包:
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
是用于在X虚拟帧缓冲区(Xvfb)内运行显示的Python包装器。
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.
这篇关于easyprocess.EasyProcessCheckInstalledError:cmd = ['Xvfb','-help'] OSError = [Errno 2]没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!