-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make Python 3.8 work #289
make Python 3.8 work #289
Conversation
CI failure: the same idiotic reason as in the other PRs. Anyone has a solution? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building with Python 3.7 no longer works for me after I merged this PR. It fails for the headless-tf1
parts.
I also tried Python 3.9 (the default for Debian stable) which failed similarly.
Then please share the error log so we can resolve this quickly.
Yeah sure, but that's true for master, too. (I am not claiming I can solve all problems at once.) |
CI failure:
I remember seeing this before, and solving be replacing/removing the pip cache dir. |
See https://github.com/stweil/ocrd_all/actions. Before merging this pull request, Python 3.6 and Python 3.7 work fine while Python 3.8 fails as expected (https://github.com/stweil/ocrd_all/actions/runs/1937666710). After merging this pull request, Python 3.6 and Python 3.8 work, but Python 3.7 fails (https://github.com/stweil/ocrd_all/actions/runs/1937673668). |
Thanks! I updated the workaround to only activate in the case of Python 3.8. (AFAICS, on 3.7 this is not necessary, and we simply do not newer versions anyway.) |
Which is strange, because you would expect the CI container to start without a cache, and without Current CI failure is the 1h timeout again. 😞 |
…image/tensorflow) conflict
(to gain speed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like handling of non Intel architectures is still missing.
@bertsky, I think we can address the unhandled target architectures later and apply the pull request. Maybe you can change the code which checks the Python version and introduce a new macro |
Definitely. When and if...
There's a recipe here already which detects the major version. IIUC you want to expose that as a make variable for other rules as well. How is that related to this PR? |
CI: 033b5dd does the trick for now. We should revisit the problems related to use of Thus, ready for merging. |
Now runs into the CircleCI timeout again. I'll disable saving artifacts. |
ifneq ($(suffix $(PYTHON)),) | ||
# install specific Python version in system via PPA | ||
apt-get install -y software-properties-common | ||
add-apt-repository -y ppa:deadsnakes/ppa | ||
apt-get update | ||
apt-get install -y --no-install-recommends $(notdir $(PYTHON))-dev $(notdir $(PYTHON))-venv | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this block added? I don't think that it is a good idea to install a Python package from PPA just because the user added PYTHON=python3.7
to the build options. It can either overwrite an existing installation or install an unneeded 2nd Python installation from a less secure source (which is even added to the apt sources).
I noticed these instructions while building a Docker image with GitLab actions which already provides any desired Python version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because our current reference platform, i.e. the one targeted by deps-ubuntu
, is still Ubuntu 18.04. And that uses 3.6 by default for python3, and needs PPAs for more recent versions. (Same with our ocrd_tesserocr recipe.)
I agree it's not a good pattern, but we need some kind of dual version support during the grace period between Ubuntu 18 and 20 (Python 3.6 and 3.8). Think of it as something we can drop as soon as the shift to 20 is complete. (And after that we should find better mechanisms to encapsulate system dependencies.)
I think the natural way to avoid interference with tailored environments like CI is to not set PYTHON
there, but instead make it that environment's default version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
18.04 does not need PPA for Python 3.7: https://packages.ubuntu.com/search?keywords=python3.7. And I don't think that the installation of Python should be part of the Makefile rules. Let it fail if someone says make all PYTHON=python3.7
without providing that version.
Depends on OCR-D/ocrd_anybaseocr#89 (which in turn depends on OCR-D/ocropy#2).