Skip to content

Commit 4336771

Browse files
authored
fix opencv import error for numpy 2.0 (#13105)
* fix opencv import error for numpy 2.0 * update requirements.txt
1 parent 6d5f998 commit 4336771

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
python -m pip install --upgrade pip
2424
pip install pytest
2525
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26-
pip install "paddlepaddle==2.5"
26+
pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html
2727
pip install -e .
2828
- name: Test with pytest
2929
run: |

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ dependencies = [
4747
"tqdm",
4848
"numpy<2.0",
4949
"rapidfuzz",
50-
"opencv-python<=4.6.0.66",
51-
"opencv-contrib-python<=4.6.0.66",
50+
"opencv-python",
51+
"opencv-contrib-python",
5252
"cython",
53-
"Pillow>=10.0.0",
53+
"Pillow",
5454
"pyyaml",
5555
"python-docx",
5656
"beautifulsoup4",

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ lmdb
66
tqdm
77
numpy<2.0
88
rapidfuzz
9-
opencv-python<=4.6.0.66
10-
opencv-contrib-python<=4.6.0.66
9+
opencv-python
10+
opencv-contrib-python
1111
cython
12-
Pillow>=10.0.0
12+
Pillow
1313
pyyaml
1414
requests

0 commit comments

Comments
 (0)