Skip to content

Commit dc5d706

Browse files
author
Christopher Doris
committed
delete JULIA_PYTHONCALL_LIBPTR
1 parent f4fc413 commit dc5d706

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cpython/context.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ function init_context()
4848
# this ensures PyCall uses the same Python interpreter
4949
get!(ENV, "PYTHON", exe_path)
5050
end
51+
# On success, delete JULIA_PYTHONCALL_LIBPTR so that further processes do not think
52+
# they are embedded in Python (e.g. this can happen when precompiling).
53+
# See https://github.com/cjdoris/PythonCall.jl/issues/235
54+
delete!(ENV, "JULIA_PYTHONCALL_LIBPTR")
5155
else
5256
# Find Python executable
5357
exe_path = get(ENV, "JULIA_PYTHONCALL_EXE", "")

0 commit comments

Comments
 (0)