I installed Julia 1.9.3 on my windows 11 pc and add the package PyPlot. Then, going in VS code the Julia version is immediately recognize (so okay). Whenever I write using PyPlot all works well, but when I try to make a very simple plot, for example plot(rand(5)) including gcf() the code run and run without stopping and show me the plot. How can I fix the problem? Writing instead the same lines of code in the REPL it seems to appear the plot, but then all close automatically.
Welcome to the forum.
If you can’t find out the cause of the problem, you could also try PythonPlot.jl instead. It might be more reliable and it uses the same plotting library.
I considered that solution, as well as also Plots, and both work. The problem is that I have to run codes that are written with PyPlot and just replace the name of the package does not work since seems that they have different commands. On my old computer all goes well, but when I installed on my new pc the problem start.
Thanks for the suggestion, but it seems that nothing happens, I attach the output on the REPL
julia> using Pkg
julia> Pkg.build(“PyCall”)
Building Conda ─→ C:\Users\Andrea\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\51cab8e982c5b598eea9c8ceaced4b58d9dd37c9\build.log
Building PyCall → C:\Users\Andrea\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\9816a3826b0ebf49ab4926e2b18842ad8b5c8f04\build.log
After doing this when I try to make a plot with PyPlot all is as before.