Skip to main content
added 99 characters in body
Source Link
wim
  • 368.2k
  • 114
  • 681
  • 817

That is an implicit relative import, it would have worked in Python 2 but it's no longer allowed in Python 3. From PEP 8:

Implicit relative imports should never be used and have been removed in Python 3.

In util_one.py module, change it to:

from folder_beta import util_two 

Explicit relative imports are also possible here, the equivalent would be:

from . import util_two 

That is an implicit relative import, it would have worked in Python 2 but it's no longer allowed in Python 3. From PEP 8:

Implicit relative imports should never be used and have been removed in Python 3.

In util_one.py module, change it to:

from folder_beta import util_two 

That is an implicit relative import, it would have worked in Python 2 but it's no longer allowed in Python 3. From PEP 8:

Implicit relative imports should never be used and have been removed in Python 3.

In util_one.py module, change it to:

from folder_beta import util_two 

Explicit relative imports are also possible here, the equivalent would be:

from . import util_two 
Source Link
wim
  • 368.2k
  • 114
  • 681
  • 817

That is an implicit relative import, it would have worked in Python 2 but it's no longer allowed in Python 3. From PEP 8:

Implicit relative imports should never be used and have been removed in Python 3.

In util_one.py module, change it to:

from folder_beta import util_two