Sudo pip3 install frappe-bench - error: externally-managed-environment

getting error “error: externally-managed-environment” when ‘sudo pip3 install frappe-bench’ is executed
what should i do?
should i create a virutal environment?

yes, in my case, I created a virtual environment and it worked. Ensure you have python 3.10 or 3.11 as mentioned here

python -m venv <YOUR_DIRECTORY>
source <YOUR_DIRECTORY>/bin/activate
pip install frappe-bench
1 Like