PyCall installation on macOS - M1

Hi,

I need to run sklearn.metrics library which is not available in Julia yet.
I tried to run on my macbookpro M1 but I run into this issue:

julia> using PyCall
Python path configuration:
PYTHONHOME = ‘/Users/alexdunant/.julia/conda/3:/Users/alexdunant/.julia/conda/3’
PYTHONPATH = (not set)
program name = ‘/Users/alexdunant/.julia/conda/3/bin/python’
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = ‘/Users/alexdunant/.julia/conda/3/bin/python’
sys.base_prefix = ‘/Users/alexdunant/.julia/conda/3’
sys.base_exec_prefix = ‘/Users/alexdunant/.julia/conda/3’
sys.platlibdir = ‘lib’
sys.executable = ‘/Users/alexdunant/.julia/conda/3/bin/python’
sys.prefix = ‘/Users/alexdunant/.julia/conda/3’
sys.exec_prefix = ‘/Users/alexdunant/.julia/conda/3’
sys.path = [
‘/Users/alexdunant/.julia/conda/3/lib/python310.zip’,
‘/Users/alexdunant/.julia/conda/3/lib/python3.10’,
‘/Users/alexdunant/.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 0x0000000100b48580 (most recent call first):

Saving session…
…copying shared history…
…saving history…truncating history files…
…completed.
Deleting expired sessions…none found.

[Process completed]

I tried to run do it on Windows, and it worked perfectly.
Anybody managed to make it work on mac?

Thank you for your help

Sounds like you have a broken Python installation. I would rm("/Users/alexdunant/.julia/conda", recursive=true) and try again.