FileNotFoundError: [Errno 2] No such file or directory although the file exists

Hi,

so you moved from Python v3.8 to v3.11. Note that when you move between different Python versions, all packages that you had (installed) in a previous version do not automatically migrate to the new version. They are two independent versions with their own unique PATHs installed on your system. If you want to continue using previously installed packages, you can do either of the following:

  1. Re-install the packages to your new PATH via pip.
  2. Append the PATH directory of where the required packages are currently located to the new Python v3.11 PATH directory.
import sys
sys.path.append(r'enter\package\path\here')

Here is a related (I think) post: