Skip to content

Commit 9a780c6

Browse files
fix PIL imports
1 parent 3362f56 commit 9a780c6

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CondaPkg.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
channels = ["conda-forge"]
22

33
[deps]
4-
h5py = ""
5-
pillow = ">=9.1, <10"
6-
numpy = ">=1.20, <2"
7-
datasets = ">=2.7, <3"
8-
pyarrow = "==6.0.0"
4+
# h5py = ""
5+
# pillow = ">=9.1, <10"
6+
# numpy = ">=1.20, <2"
7+
pillow = ""
8+
datasets = ">=2.12, <3"
9+
10+
# pyarrow = "==6.0.0"

src/HuggingFaceDatasets.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ function __init__()
4141
# https://cjdoris.github.io/PythonCall.jl/dev/pythoncall-reference/#PythonCall.pycopy!
4242
PythonCall.pycopy!(datasets, pyimport("datasets"))
4343
PythonCall.pycopy!(PIL, pyimport("PIL"))
44+
pyimport("PIL.PngImagePlugin")
45+
pyimport("PIL.JpegImagePlugin")
4446
PythonCall.pycopy!(np, pyimport("numpy"))
4547
PythonCall.pycopy!(copy, pyimport("copy"))
4648
end

0 commit comments

Comments
 (0)