0

I am trying to run a script from a repo which was using python 3.7 and other packages version that were not supported in M1. I install a separate conda through open terminal under Rosetta, i can install those specific packages i need. but when i try to run some sample scripts (repo comes with some pytest example) i always got error of Python Segmentation Fault.

Any clue/direction on how to solve this, or this is not solvable.

Or any detail might be helpful to understand the situation.

Thanks.

Frant
  • 5,382
  • 1
  • 16
  • 22

1 Answers1

0

I don't know if it's solvable, but I think I'm running into the same issue.

For reasons (ortools package not supporting M1) I need to run Python under Rosetta 2, the following used to work, but now segfaults:

# Install Homebrew with Rosetta 2 / Intel 
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# Install Python 3.8 using 'Intel' Homebrew
arch -x86_64 /usr/local/bin/brew install python@3.8

Then in my project directory, I setup a venv:

arch -x86_64 /usr/local/bin/python3.8 -m venv venv 
. ./venv/bin/activate
# Install requirements (including pytest)
arch -x86_64 pip install -r requirements-dev.txt

Then I get a segfault, regardless of if I run pytest under Rosetta or not:

(venv) me@host myproject % pytest
zsh: segmentation fault  pytest
(venv) me@host myproject  % arch -x86_64 pytest test/unit_tests 
zsh: segmentation fault  arch -x86_64 pytest test/unit_tests