Python/Linux beginner here! I'm using Codenvy (https://codenvy.com/) as an IDE for a PyGame project. I've modified my requirements.txt file with a single line:
pygame
But when I attempt to run it, I receive the following message from console:
[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
I found that there was another post that documented a similar problem, and found that this means that Codenvy doesn't have my dependency (PyGame). There were two pieces of documentation linked in that post: how to build a custom runtime in Codenvy and how to build a custom machine.
Working off of this, so far, I've copied Codenvy's default Django + Python 2.7 docker file over into a new docker file. I've modified the line that the program uses to install from requirements.txt. This is what I have now:
RUN cd /tmp/application && \
sudo virtualenv /env && \
sudo /env/bin/pip install -r requirements.txt && \
sudo apt-get install python-pygame
The final && \ was my own addition. Unfortunately, I get an error right about here.
[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.
Can someone please explain why I'm getting an abort statement? If the command that I used to install pygame was incorrect, what is improper about it, and how would I go about fixing it?
I have since tried to use the -y
flag to automatically confirm choices (I believe that this is why I get the abort, going by what was printed to console). This is now my addition.
RUN sudo apt-get install python-pygame -y --fix-missing
And I get the following errors:
...
[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
These 404s have to do with debian rather than pygame specifically. What can I do to fix this?