Open Yif18 opened 1 year ago
This is by design; as the error message indicates, if you'd like to use the integrated dowhy functionality you should install the dowhy
extra (pip install econml[dowhy]
), not only the base econml
package.
Is there something that we could change about the error message or documentation to make this more clear?
This is by design; as the error message indicates, if you'd like to use the integrated dowhy functionality you should install the
dowhy
extra (pip install econml[dowhy]
), not only the baseeconml
package.Is there something that we could change about the error message or documentation to make this more clear?
i have installed econml[dowhy] and dowhy,but the error still exists,I found that this error is related to the Python version, and it occurs when I use the latest version of Python(3.10.9)
@kbattocchi I am getting the same error despite trying the pip installs you mentioned. Can you clarify?
@titubs Could you include both the full stack trace as well as the output of pip list
?
I suspect the issue is actually that either import dowhy
or from dowhy import CausalModel
is throwing an exception, which we interpret as dowhy not being installed, but which could be caused by some other issue internal to the dowhy package. Could you try running just those two lines in an interpreter and see if you get an error message when you do?
import dowhy import econml.dowhy
est = LinearDML(model_y=GradientBoostingRegressor(), model_t=GradientBoostingRegressor(), featurizer=PolynomialFeatures(degree=2, include_bias=False)) est_dw = est.dowhy.fit(Y, T, X=X, W=W, outcome_names=["log_demand"], treatment_names=["log_price"], feature_names=["income"], confounder_names=confounder_names, inference="statsmodels")
ImportError: dowhy is no longer a dependency of the main econml package; install econml[dowhy] or econml[all] to require it, or install dowhy separately to use dowhy from econml