WolfMoon
@WolfMoon

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

PyPlot, PyCall, SymPy などが使えません

macOS Monterey 12.4, Julia 1.7.3, Python 3.10.5 (いずれも最新版)ですが,
PyPlot, PyCall, SymPy などが使えません。
ModuleNotFoundError: No module named 'encodings' が出て,プリコンパイルに失敗しています。

Julia 1.7.2 では問題なく使えていたのですが。

julia> using PyPlot
[ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
Python path configuration:
  PYTHONHOME = '/Users/foo/.julia/conda/3:/Users/foo/.julia/conda/3'
  PYTHONPATH = (not set)
  program name = '/Users/foo/.julia/conda/3/bin/python'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/Users/foo/.julia/conda/3/bin/python'
  sys.base_prefix = '/Users/foo/.julia/conda/3'
  sys.base_exec_prefix = '/Users/foo/.julia/conda/3'
  sys.platlibdir = 'lib'
  sys.executable = '/Users/foo/.julia/conda/3/bin/python'
  sys.prefix = '/Users/foo/.julia/conda/3'
  sys.exec_prefix = '/Users/foo/.julia/conda/3'
  sys.path = [
    '/Users/foo/.julia/conda/3/lib/python310.zip',
    '/Users/foo/.julia/conda/3/lib/python3.10',
    '/Users/foo/.julia/conda/3/lib/python3.10/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 0x000000020271b600 (most recent call first):
  <no Python frame>
ERROR: Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to /Users/foo/.julia/compiled/v1.7/PyPlot/jl_88IZTH.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997
0

No Answers yet.

Your answer might help someone💌