Evizero / Augmentor.jl

A fast image augmentation library in Julia for machine learning.
https://evizero.github.io/Augmentor.jl/
Other
137 stars 48 forks source link

CI: Documentation build fails #88

Closed barucden closed 2 years ago

barucden commented 2 years ago

Documentation build fails in a recent PR (see log). The issue comes from MLDatasets.jl, which uses Conda to install scipy. This is done by calling pyimport_conda from the PyCall.jl package. It seems that PyCall does not install conda on linux-based systems by default, and so the invocation of pyimport_conda results in the error that we see in our log (probably from here).

I could reproduce this error in a fresh Julia environment on my computer (with a linux-based system without conda installed).

```julia (@v1.6) pkg> generate Test Generating project Test: Test/Project.toml Test/src/Test.jl (@v1.6) pkg> activate Test Activating environment at `/tmp/Test/Project.toml` (Test) pkg> add MLDatasets Updating registry at `~/.julia/registries/General` Resolving package versions... Updating `/tmp/Test/Project.toml` [eb30cadb] + MLDatasets v0.5.9 Updating `/tmp/Test/Manifest.toml` [9e28174c] + BinDeps v1.0.2 [b99e7846] + BinaryProvider v0.5.10 [a74b3585] + Blosc v0.7.0 [e1450e63] + BufferedStreams v1.0.0 [944b1d66] + CodecZlib v0.7.0 [3da002f7] + ColorTypes v0.11.0 [34da2185] + Compat v3.32.0 [8f4d0f93] + Conda v1.5.2 [124859b0] + DataDeps v0.7.7 [53c48c17] + FixedPointNumbers v0.8.4 [92fee26a] + GZip v0.5.1 [f67ccb44] + HDF5 v0.15.6 [cd3eb016] + HTTP v0.9.13 [83e8ac13] + IniFile v0.5.0 [692b3bcd] + JLLWrappers v1.3.0 [682c06a0] + JSON v0.21.1 [23992714] + MAT v0.10.1 [eb30cadb] + MLDatasets v0.5.9 [1914dd2f] + MacroTools v0.5.6 [739be429] + MbedTLS v1.0.3 [69de0a69] + Parsers v1.1.1 [21216c6a] + Preferences v1.2.2 [438e738f] + PyCall v1.92.3 [189a3867] + Reexport v1.1.0 [ae029012] + Requires v1.1.3 [3bb67fe8] + TranscodingStreams v0.9.5 [30578b45] + URIParser v0.4.1 [5c2747f8] + URIs v1.3.0 [81def892] + VersionParsing v1.2.0 [0b7ba130] + Blosc_jll v1.21.0+0 [0234f1f7] + HDF5_jll v1.12.0+1 [5ced341a] + Lz4_jll v1.9.3+0 [458c3c95] + OpenSSL_jll v1.1.10+0 [3161d3a3] + Zstd_jll v1.5.0+0 [0dad84c5] + ArgTools [56f22d72] + Artifacts [2a0f44e3] + Base64 [ade2ca70] + Dates [8bb1440f] + DelimitedFiles [8ba89e20] + Distributed [f43a241f] + Downloads [b77e0a4c] + InteractiveUtils [b27032c2] + LibCURL [76f85450] + LibGit2 [8f399da3] + Libdl [37e2e46d] + LinearAlgebra [56ddb016] + Logging [d6f4376e] + Markdown [a63ad114] + Mmap [ca575930] + NetworkOptions [44cfe95a] + Pkg [de0858da] + Printf [3fa0cd96] + REPL [9a3f8284] + Random [ea8e919c] + SHA [9e88b42a] + Serialization [1a1011a3] + SharedArrays [6462fe0b] + Sockets [2f01184e] + SparseArrays [10745b16] + Statistics [fa267f1f] + TOML [a4e569a6] + Tar [8dfed614] + Test [cf7118a7] + UUIDs [4ec0a83e] + Unicode [deac9b47] + LibCURL_jll [29816b5a] + LibSSH2_jll [c8ffd9c3] + MbedTLS_jll [14a3606d] + MozillaCACerts_jll [83775a58] + Zlib_jll [8e850ede] + nghttp2_jll [3f19e933] + p7zip_jll Precompiling project... 1 dependency successfully precompiled in 3 seconds (37 already precompiled) julia> using MLDatasets ERROR: InitError: PyError (PyImport_ImportModule The Python package scipy could not be imported by pyimport. Usually this means that you did not install scipy in the Python version being used by PyCall. PyCall is currently configured to use the Python version at: /usr/bin/python3 and you should use whatever mechanism you usually use (apt-get, pip, conda, etcetera) to install the Python package containing the scipy module. One alternative is to re-configure PyCall to use a different Python version on your system: set ENV["PYTHON"] to the path/name of the python executable you want to use, run Pkg.build("PyCall"), and re-launch Julia. Another alternative is to configure PyCall to use a Julia-specific Python distribution via the Conda.jl package (which installs a private Anaconda Python distribution), which has the advantage that packages can be installed and kept up-to-date via Julia. As explained in the PyCall documentation, set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then, To install the scipy module, you can use `pyimport_conda("scipy", PKG)`, where PKG is the Anaconda package that contains the module scipy, or alternatively you can use the Conda package directly (via `using Conda` followed by `Conda.add` etcetera). ) ModuleNotFoundError("No module named 'scipy'") Stacktrace: [1] pyimport(name::String) @ PyCall ~/.julia/packages/PyCall/BD546/src/PyCall.jl:550 [2] pyimport_conda(modulename::String, condapkg::String, channel::String) @ PyCall ~/.julia/packages/PyCall/BD546/src/PyCall.jl:708 [3] pyimport_conda @ ~/.julia/packages/PyCall/BD546/src/PyCall.jl:707 [inlined] [4] __init__() @ MLDatasets ~/.julia/packages/MLDatasets/KMScX/src/MLDatasets.jl:62 [5] _include_from_serialized(path::String, depmods::Vector{Any}) @ Base ./loading.jl:696 [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String) @ Base ./loading.jl:782 [7] _require(pkg::Base.PkgId) @ Base ./loading.jl:1020 [8] require(uuidkey::Base.PkgId) @ Base ./loading.jl:936 [9] require(into::Module, mod::Symbol) @ Base ./loading.jl:923 during initialization of module MLDatasets ```