以下是我的项目结构:
root directory
| - __init__.py
| - notdoneyet.py
| - helpers.py
| - opencv_generators.py
| - seam_carve.py
| - imgtovideos.py
notdoneyet.py
文件包含项目的入口点,其余脚本在需要时作为模块导入。
我的__init__.py
包含以下代码:
from .notdoneyet import user_input
from .helpers import createFolder
from .helpers import getFileExtension
from .helpers import writeImage
from .opencv_generators import generateEnergyMap
from .opencv_generators import generateColorMap
from .imagetovideos import generateVideo
from .imagetovideos import getToProcessPaths
from .seam_carve import cropByColumn
from .seam_carve import cropByRow
我已经在testPyPI上发布了该软件包。但是当我在本地计算机上安装后尝试导入它时,出现导入错误。
notdoneyet.py
的初始代码:
import os, sys, cv2, argparse
#Local imports
import imgtovideos as itv
import helpers as hp #Error on this line
import opencv_generators as og
import seam_carve as sc
def main(argsip):
#usr inpt
我收到错误“没有名为助手的模块”
请帮助我。 谢谢。