LoginSignup
2
0

More than 1 year has passed since last update.

[M1 mac, Docker] pythonコンテナでpip installしたときにNo matching distribution found for ~ が出る

Posted at

最近開發環境が変わることが多く、その際の開発をうまく行えるようにwebサーバーの環境立ち上げをdockerで行っていました。
そこで起こったエラーの対処法になります。

エラー内容

  • 他のマシンではdocker-compose buildの際のpip install が通る
  • 特定のマシンで docker-compose buildしたときに以下のエラーが出てpythonのモジュールがinstallできない
  • 自分の場合ではpython-copasiが該当しました。
ERROR: Could not find a version that satisfies the requirement python-copasi (from versions: none)
ERROR: No matching distribution found for python-copasi

結論

以下と同様の方法でinstallができるようになりました。
https://ryotarch.com/docker/no-matching-manifest-for-linux-arm64-v8-on-m1-mac/

M1 macでコンテナを建てるとplatformが異なる形で生成されるそう、、
docker-composeに以下を追記することでpip installが通るようになりました。

    platform: linux/x86_64
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0