"tutor images build openedx" failed

Hi everybody!
I have a strange error when I try to build the openedx image when installing the “indigo” theme. Please find the error bellow:

Collecting py2neo==3.1.2
  Downloading py2neo-3.1.2.tar.gz (100 kB)
ERROR: Could not find a version that satisfies the requirement pycontracts==1.8.14 (from -r requirements/edx/base.txt (line 184)) (from versions: 1.2.0, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.6, 1.7.7, 1.7.8, 1.7.9, 1.7.10, 1.7.11, 1.7.12, 1.7.13, 1.7.14, 1.7.15, 1.7.16, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.8.10, 1.8.11, 1.8.12)             
ERROR: No matching distribution found for pycontracts==1.8.14 (from -r requirements/edx/base.txt (line 184))                                       
WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available.                                                                   
You should consider upgrading via the '/openedx/venv/bin/python3.5 -m pip install --upgrade pip' command.                                          
The command '/bin/sh -c pip install -r requirements/edx/base.txt' returned a non-zero code: 1                                                      
Error: Command failed with status 1: docker build -t docker.io/overhangio/openedx:10.0.9 /home/tutor/.local/share/tutor/env/build/openedx

For information, I just upgraded tutor to the 10.0.9.

Any idea?

Thank you very much! :slight_smile:

Good catch @florianbusi! It seems that pycontracts==1.8.14 was pulled from pypi. A PR was opened an hour ago to backport the fix in edx-platform: https://github.com/edx/edx-platform/pull/24376
I’ll make a new tutor release that cherrypicks this change.

1 Like

Hi @regis, you’re the best :smiling_face_with_three_hearts:

By the way, how can we help you with your wonderful Tutor? We are just starting up so for the moment we cannot afford to take the LTS, but we really want to help :pray:t3:
Merci pour tout :clap:t3:

Best regards,

Florian

Thanks @florianbusi! Please check this post to learn about how you can help.

1 Like

Dear @regis
New problem just after the upgrade from 10.0.9 to 10.0.10
The “tutor image build openedx” works like a charm, but when I try to start the stack (“tutor local quickstart” or “tutor local reboot”), the following error occurs:

docker-compose -f /home/tutor/.local/share/tutor/env/local/docker-compose.yml -f /home/tutor/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans                                                                                                      
Pulling forum (docker.io/overhangio/openedx-forum:10.0.10)...
ERROR: manifest for overhangio/openedx-forum:10.0.10 not found: manifest unknown: manifest unknown
Error: Command failed with status 1: docker-compose -f /home/tutor/.local/share/tutor/env/local/docker-compose.yml -f /home/tutor/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans 

The stack cannot start :face_with_raised_eyebrow: :smile:

Any idea?

Do you prefer that I move this new bug to a new topic?

Thanks a lot :pray:

There was a problem with building the new images. Please wait a few minutes more and they should be published to dockerhub.

1 Like

I encountered today the same problem trying to build a local image for version 10.2.2 (similar builds for the very same version did not have any such issue).

Downloading psutil-1.2.1.tar.gz (167 kB)
ERROR: Could not find a version that satisfies the requirement py2neo==3.1.2 (from -r ./requirements/edx/base.txt (line 183)) (from versions: 4.0.0, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.2.0, 4.3.0, 2020.0.0, 2020.1.0, 2020.1.1, 2021.0.0, 2021.0.1)
ERROR: No matching distribution found for py2neo==3.1.2 (from -r ./requirements/edx/base.txt (line 183))

Any ideas why this happens? Is there a workaround?

thanks

There is fix in open edX master branch, please refer to below two commits. The general idea is use github version of py2neo instead of PyPI. @galas

I just ran into this exact error when trying to build a local image for 10.5.3.

I’ll outline my fix below. I have no idea if it is the correct way of fixing this, but it worked for me. If anyone has a better solution, please let me know.

I downloaded a copy of base.txt from github here: edx-platform/base.txt at open-release/juniper.master · edx/edx-platform · GitHub

I then modified line line 184 from:

py2neo==3.1.2 # via -r requirements/edx/base.in

to:

git+https://github.com/technige/py2neo.git@py2neo-3.1.2#egg=py2neo==3.1.2

I copied the new base.txt file into ~/.local/share/tutor/env/build/openedx/requirements

I then made the following change in the Dockerfile:

From:

# Install base requirements
RUN pip install -r ./requirements/edx/base.txt

To:

# Install base requirements
COPY ./requirements/base.txt ./requirements/edx/base.txt
RUN pip install -r ./requirements/edx/base.txt

I then rebuilt the images and everything worked.

Again, if there is a better solution to this, I’m all ears.

4 Likes

Hi all!

@ToddLichty Your workaround works like a charm! Really appreciated the detailing of the process. As an update I observed building at last again my local images that the linked version of base.txt from the source code is already fixed with the new github repo for py2neo.

Again many thanks for the help from all!

Thanks @ToddLichty this worked great!

1 Like