見出し画像

「ERROR: After October 2020 you may...」の回避方法

1. エラー内容

pip 20.2」では、「Unity ML-Agents Release 3」のインストール時に、以下のようなエラーがでるようになりました。

$ pip install -e ./ml-agents
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

tensorflow 2.3.1 requires h5py<2.11.0,>=2.10.0, but you'll have h5py 3.0.0 which is incompatible.
tensorflow 2.3.1 requires numpy<1.19.0,>=1.16.0, but you'll have numpy 1.19.4 which is incompatible.

2. エラー原因

「pip」の依存関係チェックが厳しくなったのがエラー原因のようです。

・20.2 (導入済み) : デフォルトでは既存の依存関係チェッカー(リゾルバー)が使われる。--use-feature=2020-resolverオプションで新しいリゾルバーを使える。
・20.3 (ベータ版) : デフォルトで新しいリゾルバーを使う。--use-deprecated=legacy-resolverオプションで以前のリゾルバーを使える。
・21.0 (将来版) : 新しいリゾルバーのみを使える(古いリゾルバーは消去)

3. 解決方法

◎ pip 20.2
--use-feature=2020-resolver」を付加することで解決しました。

$ pip install -e ./ml-agents --use-feature=2020-resolver
    :
Successfully installed h5py-2.10.0 numpy-1.18.5

◎ pip 20.3b1
エラーは発生しませんでした。

$ pip install -e ./ml-agents
    :
Successfully installed absl-py-0.11.0 astunparse-1.6.3 attrs-20.2.0 cachetools-4.1.1 cattrs-1.1.1 chardet-3.0.4 gast-0.3.3 google-auth-1.23.0 google-auth-oauthlib-0.4.2 google-pasta-0.2.0 h5py-2.10.0 idna-2.10 importlib-metadata-2.0.0 keras-preprocessing-1.1.2 markdown-3.3.3 mlagents numpy-1.18.5 oauthlib-3.1.0 opt-einsum-3.3.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.24.0 requests-oauthlib-1.3.0 rsa-4.6 tensorboard-2.3.0 tensorboard-plugin-wit-1.7.0 tensorflow-2.3.1 tensorflow-estimator-2.3.0 termcolor-1.1.0 urllib3-1.25.11 werkzeug-1.0.1 wrapt-1.12.1 zipp-3.4.0ベータ版ですが次のバージョン「pip 20.3.b1」では、

「pip 20.3b1」は、以下のコマンドで利用できます。

$ pip install -U pip==20.3b1



この記事が気に入ったらサポートをしてみませんか?