Can not install python backend without profiler break

I want to be able to run python code in the backend and display the output front end. SO I can create the app, but if I install Python via terminal:

python3 -m venv venv
source venv/bin/activate

Then the AI profiler stops working and always gives the error:

Have anybody been able to install python backend and use it. Any hints?