Permission error on installing frappe on Unbuntu 12.04

On installing using sudo I get a permission error - see below.

user@host:~/projects/bench$ sudo bash
Installing for Ubuntu precise amd64
In case you encounter an error, you can post on

Installing packages for Ubuntu. This might take time…
Installing wkhtmltopdf
Adding frappe user
Installing frappe-bench
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 5, in
from pkg_resources import load_entry_point
File “/usr/lib/python2.7/dist-packages/”, line 2707, in
File “/usr/lib/python2.7/dist-packages/”, line 686, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python2.7/dist-packages/”, line 575, in resolve
env = Environment(self.entries)
File “/usr/lib/python2.7/dist-packages/”, line 744, in init
File “/usr/lib/python2.7/dist-packages/”, line 773, in scan
for dist in find_distributions(item):
File “/usr/lib/python2.7/dist-packages/”, line 1751, in find_on_path
for line in open(os.path.join(path_item, entry)):
IOError: [Errno 13] Permission denied: ‘/usr/local/lib/python2.7/dist-packages/bench.egg-link’

the pip install bench command is called via sudo. No idea why there’s a permission error.

Thanks for replying. Yes, its weird because it was run with sudo. Anyway, I was able to make better progress doing the install manually.