Skip to content
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

Support Python 3.9 #66

Closed
mikegerber opened this issue Jul 1, 2021 · 5 comments
Closed

Support Python 3.9 #66

mikegerber opened this issue Jul 1, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mikegerber
Copy link
Collaborator

In a Python 3.9 venv:

% python --version                                                                                      master 
Python 3.9.5
% pip install -e .                                                                                          master 
Obtaining file:///home/mike/devel/ocrd_calamari
Collecting h5py<3
  Using cached h5py-2.10.0.tar.gz (301 kB)
ERROR: Could not find a version that satisfies the requirement tensorflow<2.5.0,>=2.3.0rc2 (from ocrd-calamari) (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.6.0rc0)
ERROR: No matching distribution found for tensorflow<2.5.0,>=2.3.0rc2

Related to #64 and possibly #61.

@mikegerber mikegerber added the bug Something isn't working label Jul 1, 2021
@mikegerber mikegerber self-assigned this Jul 1, 2021
@bertsky
Copy link
Contributor

bertsky commented Jul 19, 2021

Related to #64

Yes, the TF<2.5 req is from #64, but that in turn was only necessary to protect the older h5py<3 from becoming dysfunctional when TF 2.5 was released.

At the time, I did not know that Calamari 1.0 models were in fact compatible with h5py 3 on TF 2.5 – I just assumed your restriction must have been the result of a diagnosis to the contrary (and I did see similar incompatibilities elsewhere).

But 15bcfde's changelog hints that this was just transient: TF 2.4 itself at the time was not compatible with h5py 3.

So, unless I am missing something, the solution to this – as well as to ocrd_all conflicts – is to just ditch both the maximum h5py and TF restrictions.

@mikegerber
Copy link
Collaborator Author

Yes, the TF<2.5 req is from #64, but that in turn was only necessary to protect the older h5py<3 from becoming dysfunctional
But 15bcfde's changelog hints that this was just transient: TF 2.4 itself at the time was not compatible with h5py 3.

That was the usual dance around shortcomings of pip, i.e. install compatible versions of TF and h5py. I'll commit a fix that seems to work for Python 3.6 and Python 3.9!

@mikegerber
Copy link
Collaborator Author

This comes up again with #61 - Calamari 2.1 depends on TF 2.4.x, which is not PyPI-available for Python >= 3.9... Great joy!

@mikegerber mikegerber reopened this Feb 23, 2022
@mikegerber
Copy link
Collaborator Author

@mikegerber
Copy link
Collaborator Author

This is not an issue at the moment, but might come up again with Calamari 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants