daducci / COMMIT

Linear framework to combine tractography and tissue micro-structure estimation with diffusion MRI
Other
45 stars 33 forks source link

Bug on import commit #52

Closed gabknight closed 6 years ago

gabknight commented 6 years ago

Do you know where this comes from? I checked out the master branch then pip install. Older version works fine. @daducci @matteofrigo

With the current master branch, I get the error running: import commit.

In [2]: import commit
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-4a13c031fad3> in <module>()
----> 1 import commit

/home/ggirard/research/COMMIT/commit/__init__.py in <module>()
----> 1 from core import Evaluation
      2 __all__ = ['core','models','solvers','proximals','trk2dictionary']
      3 
      4 from pkg_resources import get_distribution
      5 __version__ = get_distribution('commit').version

/home/ggirard/research/COMMIT/commit/core.py in <module>()

/home/ggirard/research/COMMIT/commit/solvers.py in <module>()
     11 eps = np.finfo(float).eps
     12 
---> 13 from commit.proximals import (non_negativity,
     14                              omega_group_sparsity,
     15                              prox_group_sparsity,

ImportError: No module named proximals
matteofrigo commented 6 years ago

Hi @gabknight , I just pip installed the master branch on a new environment and it works. My list of packages is the following

`(committest) me@mymachine:/home/me$ pip list

Package Version
amico 1.0
backports.shutil-get-terminal-size 1.0.0
certifi 2018.4.16 commit 1.0
Cython 0.28.3
decorator 4.3.0
dipy 0.14.0
enum34 1.1.6
h5py 2.8.0
ipython 5.7.0
ipython-genutils 0.2.0
nibabel 2.2.1
numpy 1.14.4
pathlib2 2.3.2
pexpect 4.6.0
pickleshare 0.7.4
pip 10.0.1
prompt-toolkit 1.0.15
ptyprocess 0.5.2
Pygments 2.2.0
qspace 0.1.dev0 scandir 1.7
scipy 1.1.0
setuptools 39.2.0
simplegeneric 0.8.1
six 1.11.0
traitlets 4.3.2
wcwidth 0.1.7
wheel 0.31.1
(committest) me@mymachine:/home/me$ `

Is there any significant difference with yours?

Cheers, m

daducci commented 6 years ago

Did the compilation of the cython code terminate correctly?

gabknight commented 6 years ago

OK, I re-installed from scratch. The problem disappeared. It was probably a cython compilation problem.

thx @matteofrigo @daducci