diff --git a/src/PyCall.jl b/src/PyCall.jl index 71bb65e4..0c189d18 100644 --- a/src/PyCall.jl +++ b/src/PyCall.jl @@ -622,6 +622,9 @@ function anaconda_conda() if conda || !occursin("conda", unsafe_string(ccall(@pysym(:Py_GetVersion), Ptr{UInt8}, ()))) return "" end + if isempty(pyprogramname) + return "" + end aconda = joinpath(dirname(pyprogramname), "conda") return isfile(aconda) ? aconda : "" end diff --git a/src/startup.jl b/src/startup.jl index daf3d615..203c78f0 100644 --- a/src/startup.jl +++ b/src/startup.jl @@ -80,6 +80,7 @@ else # If we're not in charge, assume the user is installing necessary python # libraries rather than messing with their configuration const conda = false + const pyprogramname = "" end const pyversion = vparse(split(Py_GetVersion(libpy_handle))[1])