2

I have directory structure following :

/Test/
   /lib/
      lib1.py
   /main/
      main.py 

and my main.py importing the class library which are defined in lib1.py using

from ..lib.lib1 import library

It gives this error:

ValueError: attempted relative import beyond top-level package

How can fix this?

SiHa
  • 7,830
  • 13
  • 34
  • 43
ssshekhawat
  • 101
  • 2
  • 6
  • 1
    Possible duplicate of [Can anyone explain python's relative imports?](http://stackoverflow.com/questions/1918539/can-anyone-explain-pythons-relative-imports) – RaminNietzsche May 04 '17 at 12:05

0 Answers0