baiwenjia / ukbb_cardiac

Some code for processing and analysing UK Biobank cardiac MR images.
Apache License 2.0
149 stars 65 forks source link

Unable to import from relative packages #9

Closed atran126 closed 3 years ago

atran126 commented 3 years ago

When I run the demo_pipeline.py as is, I get an error from each of the scripts that call functions from another script. For example, eval_wall_thickness.py gives the error "ModuleNotFoundError: No module named 'common'" for `from common.cardiac_utils import *'

How should I fix this error?

baiwenjia commented 3 years ago

The module common can be imported, if you add the git repository to the environment variable PYTHON_PATH, such as export PYTHONPATH=YOUR_GIT_REPOSITORY_PATH:"${PYTHONPATH}"