dowhy icon indicating copy to clipboard operation
dowhy copied to clipboard

Python 3.12 support

Open r7sy opened this issue 10 months ago • 9 comments

Is your feature request related to a problem? Please describe. Would like to use dowhy in a Python 3.12 project.

Describe the solution you'd like

  • Python 3.12 support

r7sy avatar Apr 24 '24 08:04 r7sy

Running from dowhy import gcm results in the following error in Python 3.12:

ModuleNotFoundError: No module named 'numpy.distutils'

Likely caused by numpy.distutils's removal in Python >= 3.12. See https://numpy.org/doc/stable/reference/distutils_status_migration.html

yechs avatar May 06 '24 06:05 yechs

@bloebp can you take a look? We can aim to do a release that supports 3.12

amit-sharma avatar May 06 '24 06:05 amit-sharma

Some of the requirements are (or were) not supporting Python 3.12, that's why we excluded it in the last release. However, that might have changed in the mean time and should be checked again. We can certainly aim at a new release and also deprecate 3.8 support.

bloebp avatar May 06 '24 14:05 bloebp

Is your feature request related to a problem? Please describe. Would like to use dowhy in a Python 3.12 project.

Describe the solution you'd like

  • Python 3.12 support

There is also another error for me when try do the same:

ModuleNotFoundError: No module named 'numpy.dual'

I also found that my case has been reported as a bug in issue #1181.

dimoibiehg avatar Jun 27 '24 09:06 dimoibiehg

@dimoibiehg can you double check the installed DoWhy version (e.g., print(dowhy.__version__)). This dual issue has been solved in a later version, I suspect you have 0.8 installed.

bloebp avatar Jun 27 '24 14:06 bloebp

@dimoibiehg can you double check the installed DoWhy version (e.g., print(dowhy.__version__)). This dual issue has been solved in a later version, I suspect you have 0.8 installed.

The result of this command is 0.8.

dimoibiehg avatar Jun 27 '24 14:06 dimoibiehg

The current version is 0.11.1, maybe try updating DoWhy. Note that you need a Python version below 3.12, so, e.g., 3.11

bloebp avatar Jun 27 '24 15:06 bloebp

The current version is 0.11.1, maybe try updating DoWhy. Note that you need a Python version below 3.12, so, e.g., 3.11

Thanks for the suggestion. However, I reported the error in this issue. What I meant is that when using Python 3.12, you will get this error as well.

dimoibiehg avatar Jun 27 '24 15:06 dimoibiehg

Ah, ok you just wanted to confirm that you have the same issue with 3.12.

Yes, we will try to address this with the next 0.12 release to be compatible with 3.12

bloebp avatar Jun 27 '24 15:06 bloebp