Hi everyone! I’m kinda used to Julia given some courses on stochastic simulations and I have never got a problem.
Now I’m struggling with an error which makes the kernel to crash: I’m running Julia1.6.3 on VS Code and when I start the repl and type using PyPlot
the below error message appears.
I did some research and tried different solutions from other people who had similar problems but I did not find anything useful that could work.
Could anybody explain me the problem? Thanks in advance
Python path configuration:
PYTHONHOME = '/Users/salvatorecandita/.julia/conda/3:/Users/salvatorecandita/.julia/conda/3'
PYTHONPATH = (not set)
program name = '/Users/salvatorecandita/.julia/conda/3/bin/python'
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 1
is in build tree = 0
stdlib dir = '/Users/salvatorecandita/.julia/conda/3/lib/python3.12'
sys._base_executable = '/Users/salvatorecandita/.julia/conda/3/bin/python'
sys.base_prefix = '/Users/salvatorecandita/.julia/conda/3'
sys.base_exec_prefix = '/Users/salvatorecandita/.julia/conda/3'
sys.platlibdir = 'lib'
sys.executable = '/Users/salvatorecandita/.julia/conda/3/bin/python'
sys.prefix = '/Users/salvatorecandita/.julia/conda/3'
sys.exec_prefix = '/Users/salvatorecandita/.julia/conda/3'
sys.path = [
'/Users/salvatorecandita/.julia/conda/3/lib/python312.zip',
'/Users/salvatorecandita/.julia/conda/3/lib/python3.12',
'/Users/salvatorecandita/.julia/conda/3/lib/python3.12/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00000001e387dc40 (most recent call first):
<no Python frame>
✗ PyPlot
0 dependencies successfully precompiled in 1 seconds. 17 already precompiled.
ERROR: The following 1 direct dependency failed to precompile:
PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to "/Users/salvatorecandita/.julia/compiled/v1.10/PyPlot/jl_JBHDRp".
Python path configuration:
PYTHONHOME = '/Users/salvatorecandita/.julia/conda/3:/Users/salvatorecandita/.julia/conda/3'
PYTHONPATH = (not set)
program name = '/Users/salvatorecandita/.julia/conda/3/bin/python'
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 1
is in build tree = 0
stdlib dir = '/Users/salvatorecandita/.julia/conda/3/lib/python3.12'
sys._base_executable = '/Users/salvatorecandita/.julia/conda/3/bin/python'
sys.base_prefix = '/Users/salvatorecandita/.julia/conda/3'
sys.base_exec_prefix = '/Users/salvatorecandita/.julia/conda/3'
sys.platlibdir = 'lib'
sys.executable = '/Users/salvatorecandita/.julia/conda/3/bin/python'
sys.prefix = '/Users/salvatorecandita/.julia/conda/3'
sys.exec_prefix = '/Users/salvatorecandita/.julia/conda/3'
sys.path = [
'/Users/salvatorecandita/.julia/conda/3/lib/python312.zip',
'/Users/salvatorecandita/.julia/conda/3/lib/python3.12',
'/Users/salvatorecandita/.julia/conda/3/lib/python3.12/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00000001e387dc40 (most recent call first):
<no Python frame
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types ~/.julia/juliaup/julia-1.10.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Types.jl:70
[2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{…}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, _from_loading::Bool, kwargs::@Kwargs{…})
@ Pkg.API ~/.julia/juliaup/julia-1.10.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:1656
[3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{_from_loading::Bool})
@ Pkg.API ~/.julia/juliaup/julia-1.10.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:159
[4] precompile
@ Pkg.API ~/.julia/juliaup/julia-1.10.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:147 [inlined]
[5] #precompile#114
@ Pkg.API ~/.julia/juliaup/julia-1.10.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:146 [inlined]
[6] #invokelatest#2
@ Base ./essentials.jl:889 [inlined]
[7] invokelatest
@ Base ./essentials.jl:884 [inlined]
[8] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1957
[9] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1806
[10] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[11] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[12] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1797
[13] macro expansion
@ Base ./loading.jl:1784 [inlined]
[14] macro expansion
@ Base ./lock.jl:267 [inlined]
[15] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1747
[16] #invoke_in_world#3
@ Base ./essentials.jl:921 [inlined]
[17] invoke_in_world
@ Base ./essentials.jl:918 [inlined]
[18] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1740
[19] eval
@ ./boot.jl:385 [inlined]
[20] eval
@ ./Base.jl:88 [inlined]
[21] repleval(m::Module, code::Expr, ::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.66.2/scripts/packages/VSCodeServer/src/repl.jl:229
[22] (::VSCodeServer.var"#110#112"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.66.2/scripts/packages/VSCodeServer/src/repl.jl:192
[23] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:515
[24] with_logger
@ ./logging.jl:627 [inlined]
[25] (::VSCodeServer.var"#109#111"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.66.2/scripts/packages/VSCodeServer/src/repl.jl:193
[26] #invokelatest#2
@ Base ./essentials.jl:887 [inlined]
[27] invokelatest(::Any)
@ Base ./essentials.jl:884
[28] (::VSCodeServer.var"#62#63")()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.66.2/scripts/packages/VSCodeServer/src/eval.jl:34
Some type information was truncated. Use `show(err)` to see complete types.```