0

I use windows10 and python-3.5.

I want to upgrade my pip to install 'openpyx1' module.

Because of the codes below.

c:\Python\Scripts>pip install openpyx1
Collecting openpyx1
  Could not find a version that satisfies the requirement openpyx1 (from 
versions: )
No matching distribution found for openpyx1
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' 
command.

But this code doesn't work.

python -m pip install --upgrade pip

These are the error messages I received.

c:\Python\Scripts>python -m pip install --upgrade pip
Collecting pip
  Using cached pip-9.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:\Python\lib\site-packages\pip\basecommand.py", line 211, in main
    status = self.run(options, args)
  File "C:\Python\lib\site-packages\pip\commands\install.py", line 311, in 
run
    root=options.root_path,
  File "C:\Python\lib\site-packages\pip\req\req_set.py", line 640, in 
install
    requirement.uninstall(auto_confirm=True)
  File "C:\Python\lib\site-packages\pip\req\req_install.py", line 673, in 
uninstall
    for path in pip.wheel.uninstallation_paths(dist):
  File "C:\Python\lib\site-packages\pip\wheel.py", line 512, in unique
    for item in fn(*args, **kw):
  File "C:\Python\lib\site-packages\pip\wheel.py", line 531, in 
uninstallation_paths
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
  File "C:\Python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", 
line 1619, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "C:\Python\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 0xc1 in position 22365: 
invalid start byte
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' 
command.

These codes also weren't working.

pip install --upgrade setuptools


python -m pip install --upgrade pip --no-cache-dir

How can I solve this problem?

phd
  • 82,685
  • 13
  • 120
  • 165
YE Kai
  • 13
  • 7
  • 1
    You appear to have a local wheel installation that contains non-UTF-8 metadata. We can't say *which one* because the traceback doesn't include that information. You may have to selectively remove wheels from your Python path (try bisection techniques, move half away, and if the problem persists, move the other half, etc.). – Martijn Pieters Jul 30 '17 at 12:19
  • This is otherwise not a problem with the pip upgrade itself. – Martijn Pieters Jul 30 '17 at 12:19
  • This is discussed here. https://stackoverflow.com/questions/25036897 – Pritam Pan Jul 30 '17 at 12:20
  • I solved this problem by just reinstalling python 3.6 Thanks for your answers. – YE Kai Aug 06 '17 at 22:28

0 Answers0