Search code examples
pythonmlflow

MLFlow installation error, "AttributeError: 'EntryPoints' object has no attribute 'get'"


Trying to install ML Flow on a fresh VM and getting into the error below.

VM Config: Windows Server 2022 Datacenter 21H2 20348.2113

Steps to Install MLFlow: Installed Python 3.12.1

pip3 install mlflow

This resulted into the error "ModuleNoteFoundErrror: No module named 'pkg_resources'" enter image description here

To fix this, installed "setuptools" -> pip3 install --upgrade setuptools Now the error is "AttributeError: 'EntryPoints' object has no attribute 'get'" which I cannot get around. enter image description here

There are number of posts regarding version compatibility but it is not helping. Below are the versions of libs.

mlflow==2.9.1
importlib-metadata==7.0.0

On another machine I could successfully run MLFlow with below versions so I tried to match those versions as well but it did not work. Running into the exact same error.

mlflow==2.8.1 
importlib-metadata==6.11.0
importlib-resources==6.1.1

Solution

  • I had to downgrade Python from 3.12.1 to 3.11.5 and it solved this issue.