prompt-toolkitをアップデートする

こんな感じのエラーがでる


Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a

PyYAMLはdistulits管理下なので、pipはuninstallできないらしい。

https://stackoverflow.com/questions/49911550/how-to-upgrade-disutils-package-pyyaml

pip 8.1.1なら気にせずにPyYAMLをアンインストール→最新版をインストールしてくれるらしい

なので、pipをダウングレードする
https://qiita.com/matsu911/items/72e0bb6224a30d205739


pip install pip==8.1.1

このあと、↓でprompt-toolkit のアップデート完了


pip install PyYAML -U


pip install prompt-toolkit -U