1

I want to use the PyCharm IDE for developing code in a gem5 project. With

import sys
sys.path.append('/home/<username>/gem5/src/python/')
import m5
from m5.objects import *
system = System()

i tried to import the m5 libraries of gem5 to allow linting within the project. m5 and everything related to it are not found by PyCharm

No Module named m5

How can i import this to make full use of the linter?

chenino
  • 67
  • 5
  • I also tried to add those folders to the project, now m5 will be found as a module but everything which should be imported from m5 is not – chenino May 05 '20 at 17:41
  • 1
    I have explained this in more details at: https://stackoverflow.com/a/61656340/9160762 – Ciro Santilli May 07 '20 at 11:12
  • Thanks for your clarifications. I know it might not seem this hard to understand the python part, but i want to make it easier for students to incorporate, as they are struggling with understanding gem5 – chenino May 07 '20 at 11:45

0 Answers0