Skip to content Skip to sidebar Skip to footer

Attempted Relative Import In Non-package (after 2to3)

After converting to Python 3.x using 2to3 (see my previous question), I get this error during the build: File 'setup.py', line 28, in from . import mof_compile

Solution 1:

Since there is no __init__.py, the working directory is a non-package.

You don't need a relative import.

Or.

You need an __init__.py to make a package.

Post a Comment for "Attempted Relative Import In Non-package (after 2to3)"