Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base.isinteractive() outputs false in Jupyter notebooks when Julia release channel is selected #3602

Open
terasakisatoshi opened this issue May 4, 2024 · 1 comment

Comments

@terasakisatoshi
Copy link

When I open a Jupyter notebook on VS Code, I find Base.isinteractive() outputs false when Julia release channel is selected. See on the right in the attached image below.

However, when I select kernal Julia 10.3 which comes from IJulia.jl, Base.isinteractive() outputs true (on the left side in the attached image)

The difference matters when we write code using PythonPlot.jl.

fig, axis = plt.subplots()

data = rand(513, 513)
c = axis.pcolormesh(data, cmap="RdBu_r", vmin=-1, vmax=1)
fig.colorbar(c, ax=axis)

# We need to convert fig::Py to Figure(fig)::Figure for better performance when displaying the result
display(Figure(fig))

The output of the code above depends on the value of Base.isinteractive(). If this is true, we get a dupulicated figure.)

image

I'm not sure where to fix and start debugging, but Base.isinteractive() should be true since IJulia.jl does something so that Base.isinteractive() is true.

@terasakisatoshi
Copy link
Author

Should we add --interactive option to the variable args when isJuliaup is true?

Sorry, I'm not familiar with TypeScript...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant