microsoft/BatteryML

Import issue when running `preprocess.py` | `ModuleNotFoundError: No module named 'src'`

Closed this issue · 1 comments

From the top-level directory I run:

python scripts/preprocess.py 

The status bar gets to 50% and then I get the following error:

line 11, in <module>
    from src import BatteryData, CycleData, CyclingProtocol
ModuleNotFoundError: No module named 'src'

Seems like a pathing issue with locating the src directory.

Running Python 3.9.17 on a Mac.

Try adding the project folder to PYTHONPATH:

cd path/to/BatteryML
PYTHONPATH=. python scripts/preprocess.py