ERROR: ResolutionImpossible


press
ERROR: ResolutionImpossible

ERROR: ResolutionImpossible

docker-composeコマンドでビルドした際にERROR: ResolutionImpossibleというエラーが発生しました。このエラーは複数の原因があるようですが、今回はrequirements.txtに記載したパッケージが重複しているのが原因でした。

エラー内容

#8 23.86 ERROR: Cannot install Keras==2.4.3 and keras==2.7.0 because these package versions have conflicting dependencies.
#8 23.87 
#8 23.87 The conflict is caused by:
#8 23.87     The user requested Keras==2.4.3
#8 23.87     The user requested keras==2.7.0
#8 23.87 
#8 23.87 To fix this you could try to:
#8 23.87 1. loosen the range of package versions you've specified
#8 23.87 2. remove package versions to allow pip attempt to solve the dependency conflict
#8 23.87 
#8 23.87 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
------
executor failed running [/bin/sh -c pip install --upgrade pip     && pip install -r requirements.txt]: exit code: 1
ERROR: Service 'web' failed to build : Build failed

Kerasが2.4.3と2.7.0のバージョンで重複していることが原因でしたので2.4.3の方を削除します。

absl-py==0.11.0
astunparse==1.6.3
cachetools==4.2.1
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
Flask==1.1.2
flatbuffers==1.12
gast==0.3.3
google-auth==1.27.0
google-auth-oauthlib==0.4.2
google-pasta==0.2.0
grpcio==1.32.0
gunicorn==20.0.4
h5py==2.10.0
idna==2.10
itsdangerous==1.1.0
Jinja2==2.11.3
joblib==1.0.1
Keras==2.4.3
Keras-Preprocessing==1.1.2
Markdown==3.3.4
MarkupSafe==1.1.1
oauthlib==3.1.0
opt-einsum==3.3.0
Pillow==8.1.0
protobuf==3.15.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
PyYAML==5.4.1
requests==2.25.1
requests-oauthlib==1.3.0
rsa==4.7.2
six==1.15.0
termcolor==1.1.0
threadpoolctl==2.1.0
typing-extensions==3.7.4.3
urllib3==1.26.3
Werkzeug==1.0.1
wrapt==1.12.1
jsonrpcclient==4.0.2
jsonrpcserver==5.0.5
jsonschema==3.2.0
keras==2.7.0
Keras-Preprocessing==1.1.2
numpy==1.21.4
pandas==1.3.5
scikit-learn==1.0.1
scipy==1.7.3
sklearn==0.0
tensorboard==2.7.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.7.0
tensorflow-estimator==2.7.0
tensorflow-io-gcs-filesystem==0.22.0
torch==1.10.1
torchvision==0.11.2

Keras==2.4.3を削除

再度、docker-compose builddocker-compose upを実行して無事にコンテナを起動できました。


株式会社ファントムへのお問い合わせ

群馬県でPythonを使ったAIやソフトウェアを開発している株式会社ファントムが運営しています。




    Related Articles

    Python

    WordCloudを導入した

    WordCloudとは 文章に頻出する単語を抽出して画像に出力するシステムのこと。 実装について 形態素分析 まず形態素分析する必要がある。最新の形態素分析はJUMAN++なのでそれを導入すべし。 インストールするのは簡 […]

    Posted on by EIGHT
    Python

    Appleシリコン搭載MacのDocker環境でTensorflowを使う

    Appleシリコン搭載MacのDocker環境でTensorflowを使う Intel搭載のMacで作成したTensorflowを使ったプロジェクトを移して、M1やM2などのAppleシリコンを搭載しているMacでTen […]

    Posted on by press

    最新情報をお届けします!

    メーリングリストに登録するとファントムの最新情報をお届けします

    お客様のメールアドレスを共有することはありません