Closed yakir12 closed 4 years ago
Narrowed it down to a combination of just MATLAB and ImageMagick. I posted a discourse topic about it.
libz is a bit of a mess right now, see https://github.com/JuliaGraphics/Gtk.jl/pull/387. Try varying the order in which you load packages; e.g., do using ImageMagick
before anything else.
Thanks Tim. I tried that, it doesn't do the trick :/
Should be fixed on Julia 1.3+
Why is this closed. I'm on 1.4.2 on CentOS and I can't load a simple test image on a fresh Julia installation. Same error. Also mentioned in #133
Mind to share the codes about how you reproduce the error? And how's your Julia installed, via yum
or from https://julialang.org/downloads/? It's recommended to install Julia in the latter way.
@johnnychen94 Sure, I just installed a few packages after reading JuliaImages (zlib was pulled in as dependency). Then tried:
using Images, TestImages
img = testimage("mandrill")
Which gave the error in question.
Installation:
I added the Julia repo and used yum install julia
, then added the IJulia package using the REPL. No errors.
My workaround/solution:
After googling the error, I ran import ImageMagick
before using Images, that fixed it. Later I discovered a better way: by explicitly installing zlib with Pkg.add("Zlib_jll")
it created an Artifact that solved the issue.
Even though it worked for the IJulia
case, it's still not recommended to install Julia that way. https://julialang.org/downloads/platform/#linux_and_freebsd
It is strongly recommended that the official generic binaries from the downloads page be used to install Julia on Linux and FreeBSD. ... The following distribution-specific packages are community contributed. They may not use the right versions of Julia dependencies or include important patches that the official binaries ship with. In general, bug reports will only be accepted if they are reproducible on the official generic binaries on the downloads page.
I can't reproduce that if Julia is installed by extracting the downloads from official releases (the latter way). For a 100% clean build, I use docker as an example. And I use jill.py to install Julia (also the latter way).
We haven't observed any similar reports since Julia 1.3 has brought the Artifacts feature to the ecosystem, this issue was closed because we had upgraded ImageMagick with this feature. For this reason, I highly recommend you to try installing Julia from official downloads, and see if it still gives you the same error.
Also, for a clean test, you might also want to modify the JULIA_DEPOT_PATH
to an empty folder so that you don't get accidentally affected by old packages. For example: JULIA_DEPOT_PATH=/tmp/pkgs julia
will put all related downloads to that specific folder.
Precompilation of a package that uses ImageMagick resulted in this error.
I tried to
]up
and]resolve
and]build ImageMagick
to no avail.