Comments (8)
I had set Pycharm to check for 3.6 compatibility, but it didn't mark annotations as incompatible. I changed it to a string like @bertsky recommended (release ocr4all-pylib==0.2.5
).
As the Pycharm inspection doesn't seem reliable, and I haven't started using python before 3.7 was released, I'll check the rest of the code for compatibility. But as far as I can tell from a quick glance, dataclasses should be the only other 3.7 feature used, and they are handled as a package dependency for 3.6, and the tests for ocr4all-pylib
run with python3.6
from ocrd-pixelclassifier-segmentation.
Or better yet, and since OCR-D requires supportin 3.6 as well, rewrite ocrd4all.colors
to not rely on type annotations. You can easily do that by replacing -> ColorMap
with -> 'ColorMap'
(and removing the future import).
from ocrd-pixelclassifier-segmentation.
Or better yet, and since OCR-D requires supportin 3.6 as well, rewrite
ocrd4all.colors
to not rely on type annotations. You can easily do that by replacing-> ColorMap
with-> 'ColorMap'
(and removing the future import).
I second that, I understand that type annotations are a desirable feature but we will have to support Python 3.6 for a while longer.
from ocrd-pixelclassifier-segmentation.
@crater2150 Many thanks for this quick fix!
It does work for me if I upgrade ocr4all-pylib
to 0.2.6 manually. But if I just install ocrd_pc_segmentation, I get 0.2.3.
Digging into it, I found that make deps
actually uses a dynamically created requirements.txt
(which was still old in my case). Do you think you can change the makefile to force updating that file?
from ocrd-pixelclassifier-segmentation.
@bertsky For me, make deps
always regenerates requirements.txt
, as the target already has a dependency on the .PHONY
target pip-tools
, but I added an additional .PHONY
for requirements.txt
, so make
should always start a build.
I suspect the actual problem was pip-compile
's own cache, I added a flag to its call that should disable it. Can you try if this causes the dependency to update (if you have the old requirements file still around)?
from ocrd-pixelclassifier-segmentation.
@crater2150 thanks! I did not have an old requirements.txt
around, but I faked one (with ocr4all-pylib==0.2.3
and an old date stamp). Unfortunately, after pulling 3556480 it still did not update my requirements.txt
automatically (I would have to remove it to get ocr4all-pylib==0.2.6
).
See log attached.
make-deps.zip
from ocrd-pixelclassifier-segmentation.
It seems that the help output of pip-compile is a bit misleading, I assumed "Clear any caches upfront, rebuild from scratch" would mean, that a preexisting requirements.txt
wouldn't have impact on the result. The flag actually needed is --upgrade
, which I now added to the Makefile and tested it with a faked requirements.txt
like yours. make deps
now seems to correctly upgrade to the latest compatible version.
from ocrd-pixelclassifier-segmentation.
That did the trick – thanks a lot, @crater2150 !
from ocrd-pixelclassifier-segmentation.
Related Issues (12)
- documentation: README completness, debug ocrd-tool.json HOT 1
- New lgt-model is not available after installation via pip (version 0.1.4) HOT 1
- ValueError: Error when checking input: expected input_1 to have shape (None, None, 1) but got array with shape (3177, 2350, 2) HOT 11
- TypeError: unsupported operand type(s) for -: 'int' and 'NoneType' HOT 1
- OCR-D-OCR*.xml does not contain ReadingOrder HOT 1
- TypeError: make_requirement_preparer() got an unexpected keyword argument 'wheel_download_dir' HOT 2
- use OCR-D CLI HOT 3
- makefile: install must depend on deps HOT 3
- Fix Makefile or README
- Running tests delivers no segmentation HOT 13
- Could not load dynamic library 'libnvinfer.so.6' HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocrd-pixelclassifier-segmentation.