Biotite in VScode gives FileNotFoundError! [WinError 2] The system cannot find the file specified

Hello everyone!
I am trying to run this biotite secondary application program using python3.12 in VS code in windows. I am getting this error mentioned below. Any idea how to solve the issue?
Secondary structure during an MD simulation

This script displays positional changes of secondary structure elements
(SSE) in the course of time of an MD simulation.

The trajectory file can be downloaded
:download:here </examples/download/lysozyme_md.xtc>
and the template PDB can be downloaded
:download:here </examples/download/lysozyme_md.pdb>.

Code source: Daniel Bauer, Patrick Kunzmann

License: BSD 3 clause

from matplotlib.lines import Line2D
from matplotlib import colors
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import biotite.structure as struc
import as strucio
import as xtc
from biotite.application.dssp import DsspApp

Put here the path of the downloaded files

templ_file_path = “npt.gro”
traj_file_path = “md_0_fit_less.xtc”

xtc_file =
traj = xtc_file.get_structure(template=strucio.load_structure(templ_file_path))
time = xtc_file.get_time()
traj = traj[:, struc.filter_amino_acids(traj)]

DSSP does not assign an SSE to the last residue → -1

sse = np.empty((traj.shape[0], struc.get_residue_count(traj)-1), dtype=‘U1’)
for idx, frame in enumerate(traj):
app = DsspApp(traj[idx])
sse[idx] = app.get_sse()

Matplotlib needs numbers to assign colors correctly

def sse_to_num(sse):
num = np.empty(sse.shape, dtype=int)
num[sse == ‘C’] = 0
num[sse == ‘E’] = 1
num[sse == ‘B’] = 2
num[sse == ‘S’] = 3
num[sse == ‘T’] = 4
num[sse == ‘H’] = 5
num[sse == ‘G’] = 6
num[sse == ‘I’] = 7
return num
sse = sse_to_num(sse)


SSE colormap

color_assign = {
r"\alpha-helix": “brown”,
cmap = colors.ListedColormap(color_assign.values())

plt.figure(figsize=(8.0, 6.0))
plt.imshow(sse.T, cmap=cmap, origin=‘lower’)
plt.xlabel(“Time / ps”)
ticks = np.arange(0, len(traj), 10)
plt.xticks(ticks, time[ticks].astype(int))

Custom legend below the DSSP plot

custom_lines = [
Line2D([0], [0], color=cmap(i), lw=4) for i in range(len(color_assign))
custom_lines, color_assign.keys(), loc=“upper center”,
bbox_to_anchor=(0.5, -0.15), ncol=len(color_assign), fontsize=8

The error goes as,
Traceback (most recent call last):
File “C:\Users\HP\Documents\vscode_new\python_project\”, line 43, in
File “C:\Users\HP\Documents\vscode_new\python_project\myenv\Lib\site-packages\biotite\application\”, line 63, in wrapper
return func(*args, **kwargs)
File “C:\Users\HP\Documents\vscode_new\python_project\myenv\Lib\site-packages\biotite\application\”, line 118, in start
File “C:\Users\HP\Documents\vscode_new\python_project\myenv\Lib\site-packages\biotite\application\dssp\”, line 87, in run
File “C:\Users\HP\Documents\vscode_new\python_project\myenv\Lib\site-packages\biotite\application\”, line 226, in run
self._process = Popen(
File “C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\”, line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\”, line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Please read the pinned thread and fix the formatting of the code so that we can read it properly. (You will need to redo the copy-paste, because the forum has changed some of the text to “look nice”). Use the same formatting for the error message.

Then please carefully explain: which source code file are you showing us, and why? (Is it part of the code that you wrote, or is it part of someone else’s code that you’re trying to use?) How does it relate to your project, and why do you expect it to be connected to the error?