I am getting an error when i try to pip install Django or anything, say..
pip install Django throws an error:
Traceback (most recent call last): File "/usr/local/bin/pip", line
11, in <module>
sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 233, in
main
return command.main(cmd_args) File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 251,
in main
timeout=min(5, options.timeout)) as session: File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 72,
in _build_session
insecure_hosts=options.trusted_hosts, File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 329, in
__init__
self.headers["User-Agent"] = user_agent() File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 93, in
user_agent
from pip._vendor import distro File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line
1050, in <module>
_distro = LinuxDistribution() File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line
594, in __init__
if include_lsb else {} File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line
933, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout) subprocess.CalledProcessError: Command 'lsb_release -a' returned
non-zero exit status 1
Then I checked lsb_release -a in my system. it is also corrupted, throwwing an error:
File "/usr/bin/lsb_release", line 64
print("No LSB modules are available.", file=sys.stderr)
^ SyntaxError: invalid syntax
Where could be the problem and how can I solve this?
print "No LSB modules are available.", file=sys.stderr– Rahul Nov 25 '16 at 07:34debsums(sudo apt install debsums), then check the integrity of system files withsudo debsums -s. Are there any bad files? – Chai T. Rex Nov 25 '16 at 07:48sudo debsums -snot showing anything. Just empty. – NINJA Nov 25 '16 at 07:57python3 /usr/bin/lsb_release -aalso throws the same error. – NINJA Nov 25 '16 at 08:03python3 /usr/bin/lsb_release -aworks for me butpython2 /usr/bin/lsb_release -agives error, are you sure you have installed python 3 not 2 beacause print can not be use like that in python 2. – Rahul Nov 25 '16 at 08:06which python3 /usr/bin/python3||lrwxrwxrwx 1 root root 9 Aug 27 11:52 python3 -> python3.5
– NINJA Nov 25 '16 at 08:08python3 -Vandpython -V. – Rahul Nov 25 '16 at 08:11