Saturday 12 May 2018

Getting error while installing pip or setuptools

Python has weird as well as awesome tool known as pip.

Main precaution to take care is never ever leave half baked python packages installed as they are main reasons for dependency problems.

https://stackoverflow.com/questions/16144934/trouble-install-pip-windows

pip can be upgrde or downgrade using same command:

python -m pip install --upgrade boto3

It looks like a bug in pip where it's assuming its metadata is stored as UTF-8. Instead, your username appears to be encoded as "windows-1255".

You could try the following:

File "C:\Users\name\ AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1616, in get_metadata
    return self._get(self._fn(self.egg_info, name)).decode("utf-8")

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf2 in position 22365: invalid continuation byte
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

https://stackoverflow.com/questions/35510743/error-while-upgrading-pip-unicodedecodeerror-utf-8-codec-cant-decode-byte

1. Backup: C:\Users\name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py
2. Goto line: 1616
3. Change utf-8 to mbcs.
4. Re-run upgrade