背景
Pycharmのvenv環境でyamlをインストールしようとしたらエラーになった。
状況
PycharmのTerminalにて
pip install yaml
Collecting yaml
Could not find a version that satisfies the requirement yaml (from versions: )
No matching distribution found for yaml
You are using pip version 10.0.1, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
解決まで
言われたとおりに
python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\pycharmprojects\autochronus\venv\lib\site-packages (20.0.2)
こうなる。
しかし
pip --version
pip 10.0.1 from c:\pycharmprojects\autochronus\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip (python 3.7)
結論
pip xxx
とすると、10.0を見に行ってしまうが
python pip xxx
とすると、20.0の方を見に行ってくれた。
根本解決になっていないが
python pip install xxx
でやりたいことは出来た。