scala-cli
scala-cli copied to clipboard
--python crashes on macOS / M1
Version(s)
Scala CLI version: 0.1.15
Scala version (default): 3.2.0
macOS Monterey v 12.6
Mac Studio M1
Python 3.10.6
Describe the bug
% scala-cli --python
Welcome to Scala 3.2.0 (17.0.3, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
zsh: illegal hardware instruction scala-cli --python
Hello @jpablo, I tried to reproduce your bug with the same setup on MacBook Pro M1, but it works for me:
➜ sw_vers
ProductName: macOS
ProductVersion: 12.6
BuildVersion: 21G115
➜ scala-cli about
Scala CLI version: 0.1.15
Scala version (default): 3.2.0
➜ python3 --version
Python 3.10.6
➜ scala-cli --python
Welcome to Scala 3.2.0 (17.0.3, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> import me.shadaj.scalapy.py
scala> println(py.module("sys").version)
3.10.6 (v3.10.6:9c7b4bd164, Aug 1 2022, 17:13:48) [Clang 13.0.0 (clang-1300.0.29.30)]
scala>
Can you think of anything that's non-standard about your setup and might help us reproducing the buggy behaviour? The only difference seems to by your Mac Studio M1, but as far as i know it should behave the same as MacBook Pro M1.
Looks like the issue is connection of zsh and M1 issue. Some links I found about it https://saturncloud.io/blog/zsh-illegal-hardware-instruction-python-when-using-tensorflow-on-macbook-pro-m1/ and suggest possible workarounds.
Let use know if that helped.