Skip to content

ImportError: cannot import name 'utils' from 'miaplpy.lib' during phase_linking.py execution #127

@zyh-12-hub

Description

@zyh-12-hub

Hello,

I am encountering an import error when trying to run the run_02_miaplpy_phase_linking script from the examples. The process fails because the phase_linking.py module cannot import a required utils module.
When executing the bash script, I get the following Python traceback:
Traceback (most recent call last):
File "/home/wjr/mconda/miniconda3/envs/miapy-env/bin/phase_linking.py", line 3, in
from miapy.phase_linking import main
File "/home/wjr/mconda/miniconda3/envs/miapy-env/lib/python3.12/site-packages/miapy/src/miapy/phase_linking.py", line 17, in
from miapy.lib import utils as lut
ImportError: cannot import name 'utils' from 'miapy.lib' (/home/wjr/mconda/miniconda3/envs/miapy-env/lib/python3.12/site-packages/miapy/src/miapy/lib/init.py)
I have checked the package structure, and the init.py file exists in the miapy/lib/ directory, but it seems the utils module (likely utils.py) is either not present there or cannot be found by the Python importer.
Could you please advise on what might be causing this import failure? Is there a potential installation issue or a missing component?
Thank you for your help.

Environment (if relevant):
Linux ubuntu 20.4
Python Version: 3.12
Installation method: Installed into a conda environment (miapy-env).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions