Try following the instructions on this guide - Home · frappe/frappe Wiki · GitHub
We have been consistently successful with it. If you are familiar with basic Python development, you may want to also set up a virtualenv just before running pip install -e ./bench