0

Python/Linux 初心者はこちら!PyGameプロジェクトの IDE としてCodenvy ( https://codenvy.com/ ) を使用しています。requirements.txt ファイルを次の 1 行に変更しました。

pygame

しかし、実行しようとすると、コンソールから次のメッセージが表示されます。

[DOCKER] Collecting pygame (from -r requirements.txt (line 1))
[DOCKER] Could not find any downloads that satisfy the requirement pygame (from -r requirements.txt (line 1))
[DOCKER] Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pygame to allow).
[DOCKER] No distributions at all found for pygame (from -r requirements.txt (line 1))
[DOCKER][ERROR] The command [/bin/sh -c cd /tmp/application && sudo virtualenv /env && sudo /env/bin/pip install -r requirements.txt] returned a non-zero code: 1
[ERROR] We are having trouble starting the runner and deploying application snakes_for_python. Either necessary files are missing or a fundamental configuration has changed.
Docker image build failed

同様の問題を文書化した別の投稿があり、これは Codenvy に私の依存関係 (PyGame) がないことを意味することがわかりました。その投稿には、Codenvyでカスタム ランタイムを構築する方法とカスタム マシンを構築する方法の 2 つのドキュメントがリンクされていました。

これに基づいて、これまでのところ、Codenvy のデフォルトの Django + Python 2.7 docker ファイルを新しい docker ファイルにコピーしました。プログラムが requirements.txt からインストールするために使用する行を変更しました。これは私が今持っているものです:

RUN cd /tmp/application && \
    sudo virtualenv /env && \
    sudo /env/bin/pip install -r requirements.txt && \
    sudo apt-get install python-pygame

最後の && \ は私が追加したものです。残念ながら、ここでエラーが発生します。

[DOCKER] The following NEW packages will be installed:
...
[DOCKER]ore-soundfont-gm python-numpy python-pygame tcpd x11-common
[DOCKER] 0 upgraded, 58 newly installed, 0 to remove and 12 not upgraded.
...
[DOCKER]ant to continue? [Y/n]
[DOCKER] Abort.
[DOCKER][ERROR] The command [/bin/sh -c cd /tmp/application && sudo virtualenv /env && sudo /env/bin/pip install -r requirements.txt && sudo apt-get install python-pygame] returned a non-zero code: 1
[ERROR] We are having trouble starting the runner and deploying application snakes_for_python. Either necessary files are missing or a fundamental configuration has changed.

中止ステートメントが表示される理由を誰か説明してもらえますか? pygame のインストールに使用したコマンドが間違っていた場合、何が不適切で、どのように修正すればよいでしょうか?

それ以来、-yフラグを使用して選択を自動的に確認しようとしました(これが、コンソールに出力されたものに基づいて中止される理由だと思います)。これは私の追加です。

RUN sudo apt-get install python-pygame -y --fix-missing

そして、次のエラーが表示されます。

...
[DOCKER] Get:7 http://http.debian.net/debian/ jessie/main libcap-ng0 amd64 0.7.4-2 [13.2 kB]
[DOCKER] Err http://http.debian.net/debian/ jessie/main libdbus-1-3 amd64 1.8.16-1
[DOCKER]ot Found [IP: 108.59.10.97 80]
...
[DOCKER] Get:40 http://http.debian.net/debian/ jessie/main libjbig0 amd64 2.1-3.1 [30.7 kB]
[DOCKER] Err http://http.debian.net/debian/ jessie/main libtiff5 amd64 4.0.3-12.2
[DOCKER]ot Found [IP: 108.61.5.92 80]
...
[DOCKER] Get:46 http://http.debian.net/debian/ jessie/main libsmpeg0 amd64 0.4.5+cvs20030824-7.1 [91.3 kB
[DOCKER] Err http://http.debian.net/debian/ jessie/main libtiff5 amd64 4.0.3-12.2
[DOCKER] Not Found [IP: 108.61.5.92 80]
...
[DOCKER] Get:55 http://http.debian.net/debian/ jessie/main tcpd amd64 7.6.q-25 [22.9 kB]
[DOCKER] Fetched 23.1 MB in 6s (3407 kB/s)
[DOCKER]o correct missing packages.
[DOCKER] [91mE: Failed to fetch http://http.debian.net/debian/pool/main/d/dbus/libdbus-1-3_1.8.16-1_amd64.deb  404  Not Found [IP: 108.59.10.97 80]
[DOCKER]
[DOCKER] [91mFailed to fetch http://http.debian.net/debian/pool/main/t/tiff/libtiff5_4.0.3-12.2_amd64.deb  404  Not Found [IP: 108.61.5.92 80]
[DOCKER]d to fetch http://http.debian.net/debian/pool/main/d/dbus/dbus_1.8.16-1_amd64.deb  404  Not Found [IP: 108.61.5.92 80]
[DOCKER]ing install.
[DOCKER]
[DOCKER][ERROR] The command [/bin/sh -c sudo apt-get install python-pygame -y --fix-missing] returned a non-zero code: 100
[ERROR] We are having trouble starting the runner and deploying application snakes_for_python. Either necessary files are missing or a fundamental configuration has changed.
Docker image build failed

これらの 404 は、特に pygame ではなく、debian に関係しています。これを修正するにはどうすればよいですか?

4

1 に答える 1