PyVirtualDisplay
PyVirtualDisplay copied to clipboard
FileNotFoundError: [WinError 2] Impossibile trovare il file specificato (impossible to find the specified file)
I have installed pyvirtualdisplay through Anaconda; in a jupyter notebook imported it and run the command
display = pyvirtualdisplay.Display(visible=0, size=(1400, 900)).start()
But i get the error
FileNotFoundError: [WinError 2] Impossibile trovare il file specificato
translated from Italian "Impossible to find the specified file", which one is not clear. Anyway here the full error log
FileNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_17532\940933446.py in <module>
34
35 # Set up a virtual display for rendering OpenAI gym environments.
---> 36 display = pyvirtualdisplay.Display(visible=0, size=(1400, 900)).start()
~\anaconda3\envs\mltrade2\lib\site-packages\pyvirtualdisplay\display.py in __init__(self, backend, visible, size, color_depth, bgcolor, use_xauth, retries, extra_args, manage_global_env, **kwargs)
52 raise ValueError("unknown backend: %s" % self._backend)
53
---> 54 self._obj = cls(
55 size=size,
56 color_depth=color_depth,
~\anaconda3\envs\mltrade2\lib\site-packages\pyvirtualdisplay\xvfb.py in __init__(self, size, color_depth, bgcolor, use_xauth, fbdir, dpi, retries, extra_args, manage_global_env)
42 self._dpi = dpi
43
---> 44 AbstractDisplay.__init__(
45 self,
46 PROGRAM,
~\anaconda3\envs\mltrade2\lib\site-packages\pyvirtualdisplay\abstractdisplay.py in __init__(self, program, use_xauth, retries, extra_args, manage_global_env)
83 self._retries_current = 0
84
---> 85 helptext = get_helptext(program)
86 self._has_displayfd = "-displayfd" in helptext
87 if not self._has_displayfd:
~\anaconda3\envs\mltrade2\lib\site-packages\pyvirtualdisplay\util.py in get_helptext(program)
11
12 # py3.6 also
---> 13 p = subprocess.Popen(
14 cmd,
15 stdout=subprocess.PIPE,
~\anaconda3\envs\mltrade2\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize)
964 encoding=encoding, errors=errors)
965
--> 966 self._execute_child(args, executable, preexec_fn, close_fds,
967 pass_fds, cwd, env,
968 startupinfo, creationflags, shell,
~\anaconda3\envs\mltrade2\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session)
1433 # Start the process
1434 try:
-> 1435 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
1436 # no special security
1437 None, None,
FileNotFoundError: [WinError 2] Impossibile trovare il file specificato```
"pyvirtualdisplay is a python wrapper for Xvfb, Xephyr and Xvnc"
Have you installed Xvfb?
#56 #73