# PyCall installation on macOS - M1

**URL:** <https://discourse.julialang.org/t/pycall-installation-on-macos-m1/87980>\
**Category:** General Usage\
**Tags:** pycall, os, apple\
**Created:** [September 29, 2022, 11:28am UTC](https://discourse.julialang.org/t/pycall-installation-on-macos-m1/87980 "2022-09-29T11:28:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CompulsoryCoffee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compulsorycoffee/32/30434_2.png) [@CompulsoryCoffee](https://discourse.julialang.org/u/CompulsoryCoffee)\
**Post date:** [September 29, 2022, 11:28am UTC](https://discourse.julialang.org/t/pycall-installation-on-macos-m1/87980/1 "2022-09-29T11:28:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [September 29, 2022, 1:12pm UTC](https://discourse.julialang.org/t/pycall-installation-on-macos-m1/87980/2 "2022-09-29T13:12:42Z")

</div>

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