no module named 'distutils'

During the installation of the “PyMC3” library using the “pip install PyMC3” command from the “command prompt” I received the error: "no module named ‘distutils’'.

distutils is no longer part of python from 3.12 (or was it 3.11?).
Ask the PyMC3 maintainer to update there package to support 3.12.
Or you will need to use an older version of python that PyMC3 does support.

Or consider migrating to a more recent version of PyMC. I believe that PyMC3 is no longer being developed as they have migrated to a newer backend–it was built on top of Theano, which stopped development. I haven’t followed the history closely, but they have released PyMC 4.0 which is built on Aesara (a fork of Theano that they started) and it looks like 5.0 will be built on PyTensor (a fork of Aesara, for what sounds like messy reasons).

1 Like

See also

1 Like