NaegleLab / OpenEnsembles

Code for ensemble clustering
GNU General Public License v3.0
102 stars 15 forks source link

"ImportError: No module named transforms" #2

Closed MaxAlex closed 6 years ago

MaxAlex commented 6 years ago

After installing from either pip or the Github repository copy, attempting to import the OpenEnsembles module raises an ImportError:

Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import openensembles Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/openensembles/init.py", line 1, in from openensembles.openensembles import * File "/usr/local/lib/python2.7/dist-packages/openensembles/openensembles.py", line 25, in import openensembles.transforms as tx ImportError: No module named transforms

From looking into the code, it seems like there's a circular import through openensembles/init.py : to import openensembles.transforms, Python must first import openensembles/init.py, and this attempts to import everything under openensembles, including openensembles.transforms.

shawnanastasio commented 6 years ago

Thanks for the report.

This issue only occurs on Python 2 which OpenEnsembles does not support. Installing via pip3 and running with Python 3 should resolve this issue for you.

I have also updated the readme to reflect this requirement.