Help us understand the problem. What is going on with this article?

Google Cloud Platform + Ubuntu + python3.6 でエラー

More than 3 years have passed since last update.

Google Cloud Platform で初めてインスタンスを立ち上げて、ssl でつないぎ
環境を整えるためにpython3.6 をUbuntu にインストールし他ところ見かけないエラーが出たので、メモ

$ sudo apt install python3.6-venv
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python3.6 get-pip.py
$ python3.6 -m pip list -o

Exception:
Traceback (most recent call last):
  File "/home/kentaro/ven/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/kentaro/ven/lib/python3.6/site-packages/pip/commands/list.py", line 157, in run
    packages = self.get_outdated(packages, options)
  File "/home/kentaro/ven/lib/python3.6/site-packages/pip/commands/list.py", line 168, in get_outdated
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "/home/kentaro/ven/lib/python3.6/site-packages/pip/commands/list.py", line 169, in <listcomp>
    if dist.latest_version > dist.parsed_version
TypeError: '>' not supported between instances of 'Version' and 'SetuptoolsVersion'

見かけないエラーだなーと思いパッケージをアップグレードすると症状は解消された。

$ python3.6 -m pip install --upgrade pip setuptools wheel
$ python3.6 -m pip list
Package              Version
-------------------- -------
Django               1.11.4
django-debug-toolbar 1.8
django-extensions    1.8.1
pip                  9.0.1
pkg-resources        0.0.0
pytz                 2017.2
setuptools           36.2.7
six                  1.10.0
sqlparse             0.2.3
wheel                0.29.0
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away