Make sure the package `elpa-elpy` is installed
sudo apt-get install elpa-elpy
Now you can press Ctrl-return to evalute lines in the source in the python-session-window.
;;(setq python-shell-interpreter "/usr/bin/python3.11") (setq python-shell-interpreter "/home/hans/.my-venv/bin/python")