Solution from https://askubuntu.com/questions/889535/how-to-install-pip-for-python-3-6-on-ubuntu-16-10
After install python3.6
via apt install python3.6
, pip
failure:
$ sudo pip3 install --upgrade pip
Traceback (most recent call last):
File "/usr/bin/pip3", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1479, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
The script seems to assume that python3.6 has working setup-tools / easy install. For that reason it didn't work for me. I ended up using curl https://bootstrap.pypa.io/ez_setup.py -o - | python3.6 && python3.6 -m easy_install pip