ronikobrosly / causal-curve

A python package with tools to perform causal inference using observational data when the treatment of interest is continuous.
MIT License
271 stars 18 forks source link

Dependency issues with XGBoost in Anaconda environment #15

Closed alexjonesphd closed 4 years ago

alexjonesphd commented 4 years ago

Having some trouble working with the module using Anaconda. With a clean environment (Python 3.7 - 3.8) on Mac OS X Mojave, install via pip works well, but import errors are thrown, I think due to XGBoost dependencies. I get the following error message:

XGBoostError: XGBoost Library (libxgboost.dylib) could not be loaded. Likely causes: * OpenMP runtime is not installed (vcomp140.dll or libgomp-1.dll for Windows, libomp.dylib for Mac OSX, libgomp.so for Linux and other UNIX-like OSes). Mac OSX users: Run ``brew install libomp`` to install OpenMP runtime. * You are running 32-bit Python on a 64-bit OS Error message(s): ['dlopen(/Users/alexjones/anaconda3/envs/review/lib/python3.7/site-packages/xgboost/lib/libxgboost.dylib, 6): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib\n Referenced from: /Users/alexjones/anaconda3/envs/review/lib/python3.7/site-packages/xgboost/lib/libxgboost.dylib\n Reason: image not found']

Did a little searching and it looks like XGBoost has some issues on Mac OS that may be negated by a homebrew install (https://github.com/dmlc/xgboost/issues/4477) but a workaround might be required for those not using it.

ronikobrosly commented 4 years ago

Just pushed a new version (0.3.4) that doesn't use XGBoost. So I think this should be solved.