ImportError under Python 3
Closed this issue · 3 comments
donkirkby commented
Feel free to close this if you just want to target Python 2.
I got farther with the current version than I did last time I tried, the installation now works. However, it looks like the module can't be imported.
I tried running the tests under Python 3, and after commenting out the broken print statements, I got this error:
E
======================================================================
ERROR: test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test
Traceback (most recent call last):
File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
__import__(name)
File "/mnt/data/don/git/gotoh2/tests/test.py", line 2, in <module>
from gotoh2.aligner import Aligner
File "/home/don/v3scratch/lib/python3.5/site-packages/gotoh2-0.1-py3.5-linux-x86_64.egg/gotoh2/aligner.py", line 1, in <module>
import Cgotoh2
ImportError: No module named 'Cgotoh2'
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
I would guess that you are a victim of the Python 3 changes to module initialization.
ArtPoon commented
Yeah, you've just reproduced issue #4
:)
… On May 19, 2017, at 4:31 PM, Don Kirkby ***@***.***> wrote:
Feel free to close this if you just want to target Python 2.
I got farther with the current version than I did last time I tried, the installation now works. However, it looks like the module can't be imported.
I tried running the tests under Python 3, and after commenting out the broken print statements, I got this error:
E
======================================================================
ERROR: test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test
Traceback (most recent call last):
File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
__import__(name)
File "/mnt/data/don/git/gotoh2/tests/test.py", line 2, in <module>
from gotoh2.aligner import Aligner
File "/home/don/v3scratch/lib/python3.5/site-packages/gotoh2-0.1-py3.5-linux-x86_64.egg/gotoh2/aligner.py", line 1, in <module>
import Cgotoh2
ImportError: No module named 'Cgotoh2'
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
I would guess that you are a victim of the Python 3 changes to module initialization.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
donkirkby commented
Because the test script worked under Python 2, I assumed the problem was Python 3. I'll close this as a duplicate, then.
ArtPoon commented
@donkirkby was right - this is a Python 3 migration issue that happens to produce a similar error output as #4