FileNotFoundError: [WinError 2] The system cannot find the file specified """

Hello everyone,
I am trying to setup a clone of pyelastica on my local machine, I have installed all the dependencies but I get this error when I run the visualization/examples files:

Traceback (most recent call last):
  File "C:\Users\RAHUL\anaconda3\envs\pyelastica-dev\lib\multiprocessing\pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "C:\Stash\Coding\Gsoc\PyElastica\examples\Visualization\_povmacros.py", line 127, in render
    process = subprocess.Popen(
  File "C:\Users\RAHUL\anaconda3\envs\pyelastica-dev\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\RAHUL\anaconda3\envs\pyelastica-dev\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\Stash\Coding\Gsoc\PyElastica\examples\Visualization\ContinuumSnakeVisualization\continuum_snake_render.py", line 165, in <module>
    for message in p.imap_unordered(func, batch):
  File "C:\Users\RAHUL\anaconda3\envs\pyelastica-dev\lib\multiprocessing\pool.py", line 865, in next
    raise value
FileNotFoundError: [WinError 2] The system cannot find the file specified

I would really appreciate your help.
Thanks in Advance!

Dependency
povray
moviepy
ffmpeg

Do you have these dependencies installed? Specifically here your probably need povray.exe in your PATH. Type where povray to find out if it’s there.

(Look at the line " PyElastica\examples\Visualization\_povmacros.py", line 127 in the error message. Look at the code of that file above that line. It’s trying to start povray as a subprocess.)

The issue is solved!
Actually, I had povray installed as well as added in the path variables; the problem was that the engine file was named ‘pvengine64’, after changing it to ‘povray’ it runs just fine.
Though I still had to make a few tweaks in povray settings, but the whole packages runs smoothly now.

Thank you so much for quick off the mark help @petersuter.

1 Like

Dear Rahul, I’m struggling with the same problem. Thank you so much for your directions. I have run my simulation successfully.

1 Like

I am glad it helped.