I\'ve installed the latest python (2.7.9) bundled with pip and setuptools for windows 32-bit. I\'ve tried reinstalling pip but the problem persists.
Here\'s the erro
It works on ubuntu 16.04. Step 1:
sudo gedit /home/user_name/.local/bin/pip
a file opens with the content:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
Change the main to __main__ as it appears below:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip import __main__
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(__main__._main())
Save the file and close it. And you are done!