Skip to content

Commit de9f62a

Browse files
author
Christopher Doris
committed
hard-code the python path
1 parent 7aaf154 commit de9f62a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cpython/context.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,18 @@ function init_context()
5151
exe_path = get(ENV, "JULIA_PYTHONCALL_EXE", "")
5252
if exe_path == "" || exe_path == "@CondaPkg"
5353
# By default, we use Python installed by CondaPkg.
54-
exe_path = CondaPkg.which("python")
54+
exe_path = Sys.iswindows() ? joinpath(CondaPkg.envdir(), "python.exe") : joinpath(CondaPkg.envdir(), "bin", "python")
5555
CTX.which = :CondaPkg
5656
elseif exe_path == "@PyCall"
57+
# PyCall compatibility mode
5758
PyCall = Base.require(PYCALL_PKGID)
5859
exe_path = PyCall.python::String
5960
CTX.lib_path = PyCall.libpython::String
6061
CTX.which = :PyCall
6162
elseif startswith(exe_path, "@")
6263
error("invalid JULIA_PYTHONCALL_EXE=$exe_path")
6364
else
65+
# Otherwise we use the Python specified
6466
CTX.which = :unknown
6567
end
6668

0 commit comments

Comments
 (0)