Home > Mobile >  iterative.ai MLEM | ModuleNotFoundError: No module named 'mlem.api'; 'mlem' is n
iterative.ai MLEM | ModuleNotFoundError: No module named 'mlem.api'; 'mlem' is n

Time:01-13

Goal: install and run Python script with MLEM code.

Following this installation guide in the library docs; pip install mlem should suffice.

Code:

from mlem.api import import_object

# ...

Traceback:

$ python3 app/deployment-poc/mlem.py
Traceback (most recent call last):
  File "/home/me/BitBucket/project/app/deployment-poc/mlem.py", line 1, in <module>
    from mlem.api import import_object
  File "/home/me/BitBucket/project/app/deployment-poc/mlem.py", line 1, in <module>
    from mlem.api import import_object
ModuleNotFoundError: No module named 'mlem.api'; 'mlem' is not a package

I've installed both via pip and conda.

$ which mlem
/home/me/miniconda3/envs/venv/bin/mlem
$ mlem --version
           
  • Related