imagepy icon indicating copy to clipboard operation
imagepy copied to clipboard

File "imagepy.py", line 9, in <module> from .. import IPy ValueError: Attempted relative import in non-package

Open caimt opened this issue 7 years ago • 1 comments

Hi, I need help when I start image.py by "python -m imagepy", in ubuntu14.04 python2.7 I have the following problem:

caimt @ caimt-desktop ~ / anaconda / pkgs / imagepy-0.17-py_0 / site-packages / imagepy / ui $ python -m imagepy.py Traceback (most recent call last): File "/home/caimt/anaconda/lib/python2.7/runpy.py", line 163, in _run_module_as_main mod_name, _Error) File "/home/caimt/anaconda/lib/python2.7/runpy.py", line 102, in _get_module_details loader = get_loader (mod_name) File "/home/caimt/anaconda/lib/python2.7/pkgutil.py", line 462, in get_loader return find_loader (fullname) File "/home/caimt/anaconda/lib/python2.7/pkgutil.py", line 472, in find_loader for importer in iter_importers (fullname): File "/home/caimt/anaconda/lib/python2.7/pkgutil.py", line 428, in iter_importers __import __ (pkg) File "imagepy.py", line 9, in from .. import IPy ValueError: Attempted relative import in non-package

Is there a solution? Thank you very much.

caimt avatar Nov 05 '18 18:11 caimt

@caimt did you install by anaconda? please down load the newest code from github, the conda version is little out of date. and it looks like pkgutil change the default work path. I can run on ubuntu 16.4 with python3

yxdragon avatar Nov 09 '18 03:11 yxdragon