jxx123/simglucose

Deprecated distutils in Python v3.12 causes "no module..." exception

Opened this issue · 0 comments

Environment:

  • macOS Sonoma v14.4.1
  • Apple M1 Pro silicon
  • Python v3.12.3 (homebrew package)
  • simglucose installed with pip from cloned source code

Symptom:
Python 3.12.3 (main, Apr 9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. from simglucose.simulation.user_interface import simulate Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/mariusz/Projects/simglucose/simglucose/__init__.py", line 1, in <module> from gym.envs.registration import register File "/Users/mariusz/Library/Python/3.12/lib/python/site-packages/gym/__init__.py", line 1, in <module> import distutils.version ModuleNotFoundError: No module named 'distutils'

Explanation: https://docs.python.org/3.11/library/distutils.html