Aroma
Aroma

Reputation: 11

Trouble installing CausalML

I'm trying to install causalml on my Windows machine using Python 3.12 with the command pip install causalml. But the installation fails when trying to build a wheel for causalml. Here's a snippet of the error:

note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for causalml
Failed to build causalml
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (causalml)

I've attached on pastebin the error: https://pastebin.com/dehRfgrk

But they key error messages are:

'use_tracing': is not a member of '_PyCFrame' in causalml/inference/tree/_tree/_tree.cpp.
The command "cl.exe" fails with exit code 2.
Warning regarding deprecated NumPy API and usage of Python 2.7 options (bdist_wheel.universal is deprecated).
Setuptools warnings about missing packages in the packages configuration (causalml.inference.tree, etc.)

I'm using: Python version: 3.12.
OS: Windows 10.
Compiler: Microsoft Visual Studio 2022 Build Tools.
Environment: Anaconda 3.
NumPy version: 1.26.4.

I tried updating visual studio build tools and installed the latest version and ensured C++ build tools were included.

Upvotes: 0

Views: 254

Answers (1)

dev_light
dev_light

Reputation: 3879

Looking at causalml on PyPi, there are no wheels available for Python 3.12.

However, there are wheels for Python 3.8 - 3.11. You may have to downgrade your Python to a supported version perhaps 3.11 and try again.

Upvotes: 1

Related Questions