ntucllab / libact

Pool-based active learning in Python
http://libact.readthedocs.org/
BSD 2-Clause "Simplified" License
776 stars 174 forks source link

Unable to install libact properly on MacOS #138

Closed bilalkhaliq closed 6 years ago

bilalkhaliq commented 6 years ago

I installed all the requirements and dependencies including openblas for MacOS as stated in the instructions. When I run one of the examples such as 'python plot.py', I get the following error:

Traceback (most recent call last): File "plot.py", line 21, in from libact.query_strategies import * File "/Users/bilalakhaliq/anaconda/lib/python3.5/site-packages/libact/query_strategies/init.py", line 20, in from ._variance_reduction import estVar ImportError: dlopen(/Users/bilalakhaliq/anaconda/lib/python3.5/site-packages/libact/query_strategies/_variance_reduction.cpython-35m-darwin.so, 2): Symbol not found: ___addtf3 Referenced from: /usr/local/opt/gcc/lib/gcc/7/libquadmath.0.dylib (which was built for Mac OS X 10.12) Expected in: /usr/lib/libSystem.B.dylib in /usr/local/opt/gcc/lib/gcc/7/libquadmath.0.dylib

yangarbiter commented 6 years ago

https://github.com/scipy/scipy/issues/5093

Maybe try to remove and reinstall the latest Scipy?

bilalkhaliq commented 6 years ago

Thanks for getting back.

The issue you reference highlights the problem in the scipy library compilation. In any case I did try reinstalling scipy but it didn't resolve the issue.

The problem is in the cython build for _variance_reduction.c life in the directory libact/libact/query_strategies/src/variance_reduction/

When I manually comment out all usages of the variance_reduction module in the installed source libact directory in site-packages the error goes away. Somehow ''_variance_reduction.cpython-35m-darwin.so" doesn't get the right setup flag/parameter I believe.

bilalkhaliq commented 6 years ago

I managed to get it to work by reinstalling openblas using conda instead of homebrew.