How do I update python3.7 without a network

Thank you very much,
I checked that there was python3.5.1 on the board, but I wrote the following code on jupyter that failed to execute, prompting The kernel appears to have died. It will restart automatically.
Is it because my python version is wrong? Or is it because there are no opencv libraries?
1

import cv2 as cv
import numpy as np
from matplotlib import pyplot as plt

src1 = cv.imread(“lena.png”)
cv.namedWindow(“input image”, cv.WINDOW_AUTOSIZE)
cv.imshow(“input image”, src1)

cv.waitKey(0)
cv.destroyAllWindows()