BUG fresh install on OSX conda env with pip gives a segfault
See original GitHub issueWe are using scikit-learn our benchopt package and we came across a weird behavior when installing the 1.0 release on OSX with pip in a conda env in the CI, where the import of scikit-learn causes a segfault.
After a bit of debugging, we were able to pinpoint that it comes from an interation with installing numba in the conda env beforehand. Here are the PR where we investigated this https://github.com/benchopt/benchOpt/pull/211 and the error log with a minimal reproduction:
https://github.com/benchopt/benchOpt/runs/3733088581?check_suite_focus=true
Step to reproduce:
conda create -n test_env -c conda-forge python=3.8 numpy scipy numba
conda activate test_env
pip install scikit-learn
python -c 'from sklearn.linear_model import Lasso'
This results in:
line 4: 2841 Segmentation fault: 11 python -c 'from sklearn.linear_model import Lasso'
We fixed our issue by switching to conda install which is probably safer.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Segmentation fault 11 and other errors when trying to use JAX ...
Trying to install JAX with conda using conda install jax -c conda-forge does not work so well. It fails to solve the environment...
Read more >Segfault when running mini_test on new install - Google Groups
The pip install works fine, but running the mini_test gives a segfault error when initializing the database. Any ideas? #.
Read more >Getting “Segmentation fault: 11” with Shapely in Python on ...
I am fairly new to Python package management. I started with pip and then ran into a few posts of people advocating conda,...
Read more >Installation — detectron2 0.6 documentation
PyTorch ≥ 1.8 and torchvision that matches the PyTorch installation. ... python -m pip install -e detectron2 # On macOS, you may need...
Read more >Segmentation fault after install - build - Psi4
So I recently installed Psi4 1.3.2 for macOS with Python 3.7 from the ... current miniconda installation and just make a new environment...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I can reproduce on OSX intel, using this test file:
with
lldb python test.pyand runningLooking into a fix.
Since the nightly wheels are built openmp 11 on osx now, one can check to see if the import works with the nightly build:
The
mainbranch and 1.0.X has not diverged too much given 1.0 was release not too long ago.