I am using the configuration Simulation.py in configs/common. I get the error
ValueError: Attempted relative import in non-package
The full error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "build/X86/python/m5/main.py", line 438, in main
exec(filecode, scope)
File "configs/common/Simulation.py", line 49, in <module>
from . import CpuConfig
ValueError: Attempted relative import in non-package
Simulation.py:
from __future__ import print_function
from __future__ import absolute_import
import sys
from os import getcwd
from os.path import join as joinpath
from . import CpuConfig
from . import BPConfig
from . import MemConfig
import m5
from m5.defines import buildEnv
from m5.objects import *
from m5.util import *
addToPath('../common')
I have tried changing to absolute import paths from relative import paths and I still get error. This guy had a similar error: https://www.mail-archive.com/[email protected]/msg16430.html but It didn't fix for me.
OS: Ubuntu 18.04.2 LTS
git SHA: d00aa3658498968f7dc2b586347771734af0d24a