Pycharm debugging not working

In PyCharm, running debugger:
…Python310\python.exe: can’t open file ‘C:\Users\andre\AppData\Local\Programs\PyCharm’: [Errno 2] No such file or directory
this error is coming from running:
“C:\Users\andre\Documents\Course\Udemy\PythonAngYu\clean-blog - capstone2\venv\Scripts\python.exe” -X pycache_prefix=C:\Users\andre\AppData\Local\JetBrains\PyCharmCE2024.1\cpython-cache “C:/Users/andre/AppData/Local/Programs/PyCharm Community/plugins/python-ce/helpers/pydev/pydevd.py” --multiprocess --qt-support=auto --client 127.0.0.1 --port 51536 --file “C:\Users\andre\Documents\Course\Udemy\PythonAngYu\clean-blog - capstone2\main.py”

Which seems to indicate that the whitespace between PyCharm and Community is preventing the call that works with debug mode. Weirdly normal running works fine, ive been using python and pycharm for only a couple of months and not sure exactly what is going on

…additionally. I added Python3.12 and the debugger caught the exception thrown when flask isnt installed but the first line of main = from flask import Flask, render_template.
However when I install flask it shows the same error message but for the new version of python.
Could this be a pycharm issue?

Please format your code in a proper code block, so it makes it more readable, and also so we can copy and paste it and run it ourselves. This forum uses Markdown. See this post: About the Python Help category

Also since you installed Python 3.12 your path may have changed. If a directory in your path contains a space it must be enclosed in double quotes like this:

set PATH= "C:\Users\andre\AppData\Local\Programs\PyCharm Community\";c:\other\path

Also note that in the error message slashes are used but windows requires backslashes. Python handles the conversion, which you can see in the error messages.