Trouble installing mitmproxy on Kali 2

Tried installing and upgrading mitmproxy on Kali 2 using pip.

When I tried running mitmproxy I received this error

me@kali:~$ mitmproxy 
Traceback (most recent call last):
 File "/usr/local/bin/mitmproxy", line 5, in 
 from pkg_resources import load_entry_point
 File "/usr/lib/python2.7/dist-packages/", line 2876, in <module>
 working_set = WorkingSet._build_master()
 File "/usr/lib/python2.7/dist-packages/", line 449, in _build_master
 File "/usr/lib/python2.7/dist-packages/", line 745, in require
 needed = self.resolve(parse_requirements(requirements))
 File "/usr/lib/python2.7/dist-packages/", line 639, in resolve
 raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: construct>=2.5.2

To solve this I upgraded pip using easy_install

me@kali:~$ sudo easy_install --upgrade pip
me@kali:~$ sudo pip install mitmproxy

Problem solved

me@kali:~$ sudo mitmproxy -T --host -p 443


Thank you