py-why / EconML

ALICE (Automated Learning and Intelligence for Causation and Economics) is a Microsoft Research project aimed at applying Artificial Intelligence concepts to economic decision making. One of its goals is to build a toolkit that combines state-of-the-art machine learning techniques with econometrics in order to bring automation to complex causal inference problems. To date, the ALICE Python SDK (econml) implements orthogonal machine learning algorithms such as the double machine learning work of Chernozhukov et al. This toolkit is designed to measure the causal effect of some treatment variable(s) t on an outcome variable y, controlling for a set of features x.
https://www.microsoft.com/en-us/research/project/alice/
Other
3.81k stars 714 forks source link

ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (shap) #912

Open cccchou opened 2 months ago

cccchou commented 2 months ago

when i pip install econml it shows:error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ERROR: Failed building wheel for shap Failed to build shap ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (shap) i have installed Microsoft Visual C++ 2015-2022 Redistributable 14.0 how can i fix it

BIT-Xu commented 2 months ago

+1

kbattocchi commented 2 months ago

It looks like you need the Visual C++ compiler, not the redistributable. See https://wiki.python.org/moin/WindowsCompilers#Compilers_Installation_and_configuration for step-by-step instructions that should work.

However, I'm a bit curious about your setup, because in most cases there should already be a precompiled wheel for shap that should automatically install rather than needing to be compiled from source. Could you include the output from running pip debug?

cccchou commented 2 months ago

yes you're right ihave fix it by installing the c++14.0

It looks like you need the Visual C++ compiler, not the redistributable. See https://wiki.python.org/moin/WindowsCompilers#Compilers_Installation_and_configuration for step-by-step instructions that should work.

However, I'm a bit curious about your setup, because in most cases there should already be a precompiled wheel for shap that should automatically install rather than needing to be compiled from source. Could you include the output from running pip debug?