0

pip says that I shall consider an upgrade. When I'm doing so and using

python -m pip install --upgrade pip

I get the following UnicodeDecode error message:

C:\Users\Sören>python -m pip install --upgrade pip
Collecting pip
  Using cached pip-8.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 7.1.2
Exception:
Traceback (most recent call last):
  File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\basecommand.py", line 211, in main
    status = self.run(options, args)
  File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\commands\install.py", line 311, in run
    root=options.root_path,
  File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_install.py", line 673, in uninstall
    for path in pip.wheel.uninstallation_paths(dist):
  File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\wheel.py", line 512, in unique
    for item in fn(*args, **kw):
  File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\wheel.py", line 531, in uninstallation_paths
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
  File "C:\Users\Sören\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1619, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "C:\Users\Sören\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 0xf6 in position 22366: invalid start byte
You are using pip version 7.1.2, however version 8.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

I'm running Python 3 in the 32-bit version on a Windows 10 machine. I don't know if that has anything to do with it, but I had VisualStudio, version 10, installed on my system. Now it is removed.

Kind regards John

So S
  • 581
  • 1
  • 7
  • 20
  • See http://stackoverflow.com/questions/34440958/cant-run-pip-unicodedecodeerror Worked for me –  Jan 21 '16 at 23:46

2 Answers2

0

Thanks blackpingus, your answer helped me to find the problem.

The problem was the 'ö' character, which is the name, I am using on Windows. Because of that, this name is also placed in the system path.

A workaround for that problem is to install the package using another user account, which has not any 'umlaute' in his name.

So S
  • 581
  • 1
  • 7
  • 20
0

To install updated pip

  1. From start, find the "Command Prompt
  2. Right click on "Command Prompt"
  3. Run as Administrator
  4. Provide the user name and the password if prompted
  5. Now you can upgrade pip: python -m pip install --upgrade pip