nipy / mindboggle

Automated anatomical brain label/shape analysis software (+ website)
http://mindboggle.info
Other
145 stars 54 forks source link

Installation and dependencies #26

Closed binarybottle closed 10 years ago

binarybottle commented 11 years ago

Oliver Hinds (8/9/2013):

I'm installing mindboggle in a virtualenv on the cluster, which is desirable for my dev testing. Seems like the installation instructions in INSTALL are a little stale.

In addition to nibabel, mayavi, and nipype, i had to pip install numpy and networkx.

However, even after this I get: Traceback (most recent call last): File "setup.py", line 27, in from nisext.py3builder import build_py ImportError: No module named nisext.py3builder

apt and pip know nothing of nisext. Seems like we shouldn't be requiring that users get things from github to install mindboggle? Am I doing something wrong?

binarybottle commented 11 years ago

on http://mindboggle.info/users/installation.html i mention: "Easily-installed Python distributions are available such as Anaconda, Canopy, and PythonXY that include components necessary to run Mindboggle: Python 2.7, NumPy, SciPy, Networkx, and IPython."

indeed, i am hoping that people simply install anaconda to take care of the requirements.

if i'm not mistaken, the ones that mindboggle requires are numpy, scipy, and nibabel (in addition to vtk). others may be requirements of nipype. you can set up an environment using canopy as well -- would that work?

ohinds commented 11 years ago

@brianthelion just had a good suggestion. We should make setup.py check for dependencies and install them if they aren't already.

ohinds commented 11 years ago

My point being that Mindboggle should be easily installed with the default python distribution, as well.

binarybottle commented 11 years ago

i agree. brian -- you are welcome to modify the setup.py file to enable those checks.

the thorn is the vtk installation. this is relatively easy with homebrew on osx, but not so easy otherwise. mayavi2 and matplotlib have been pains in the past, but they are not required to run mindboggle.

ohinds commented 11 years ago

I tried to install mindboggle via the workflow Satra outlined in the email thread. I ran into issues while running cmake in the tools directory:

./conda create -n mindboggle2 mayavi pip networkx scipy (NOTE: I had to add the scipy or things break) source activate mindboggle2 pip install nibabel pip install nipype (NOTE: These must be run as separate commands or the nipype breaks on unsatisfied nibabel dependency) cd $MINDBOGGLE/mindboggle python setup.py install cd ../mindboggle_tools mkdir bin cd bin cmake ..

-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at /home/ohinds/anaconda/envs/mindboggle2/lib/vtk-5.10/VTKTargets-debug.cmake:795 (MESSAGE): The imported target "vtksys" references the file

 "/home/ohinds/anaconda/envs/mindboggle2/lib/vtk-5.10/libvtksys.so.5.10.1"

but this file does not exist. Possible reasons include:

Call Stack (most recent call first): /home/ohinds/anaconda/envs/mindboggle2/lib/vtk-5.10/VTKTargets.cmake:187 (INCLUDE) /home/ohinds/anaconda/envs/mindboggle2/lib/vtk-5.10/VTKConfig.cmake:249 (INCLUDE) /usr/share/cmake-2.8/Modules/FindVTK.cmake:73 (FIND_PACKAGE) CMakeLists.txt:10 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!

binarybottle commented 11 years ago

Notes from Mahdi's installation at Stony Brook:

mayavi did not install w/pip, it has some weird conflict w/some other packages, I just downloaded it from it's site and installed it.

anaconda should be directly referenced to the continuum site. There is a Linux anaconda package as well and I got thrown off by that.

VTK also has to be directly referenced in the CMakeCache file, the way conda installs VTK, it puts the make file in a separate directory and all libs need to be sym linked there for it to work w/mindboggle, not a biggie, but it could throw people off.

when I ran make, then I ran make install, it dropped the files in /bin and /lib on the OS, meaning it avoided the PREFIX, I copied the binary and lib files to /software/CLUSTER/usr/bin/

At any rate, it compiled fine and you should be able to use it. Please make sure that you do have the proper LD_LIBRARY_PATH and PATH files set when you are on the cluster.

satra commented 11 years ago

just compiled on osx 64

conda create -n mindboggle mayavi networkx pip scipy cmake
source activate mindboggle
cd /software/nipy-repo/nibabel/
python setup.py install
cd ../nipype
python setup.py install
cd mindboggle/
python setup.py install
cd mindboggle_tools/
ccmake ..
make

in ccmake, i selected type to CMAKE_BUILD_TYPE to Release

built everything successfully.

ohinds commented 11 years ago

That workflow is broken on linux. Same error as before.

ohinds commented 11 years ago

I've traced this to a bug in anaconda where vtk libs are installed in the ....envs//lib/ dir, but the vtk cmake config looks for the shared obj files in ....envs//lib/vtk-5.10/ dir. Mahdi ran into the same thing. He symlinked the libs, but I don't think we're looking to have users do that themselves, so I avoided it. I dug for a little bit into the VTK cmake stuff, but changing paths in cmake config didn't fix things easily. I'm stopping here because debugging cmake files is harmful to the health, and it's something that has to be fixed by continuum anyhow. Bottom line is that installation is broken on linux on Anaconda 1.6.1.

satra commented 11 years ago

so anaconda made a mistake bundling vtk on linux. the libvtk*.so files are one level higher than where it should be.

issue filed

https://github.com/ContinuumIO/conda/issues/246

ohinds commented 11 years ago

Nope, the vtk libs are in the right place (consistent with where they are on my system when installed through apt). It's the cmake config that looks for them in the wrong place.

binarybottle commented 11 years ago

thank you, oliver!

vtk support is very new to anaconda, so i'll write to them to request that they fix this bug right away...

@ On Aug 13, 2013 10:16 AM, "ohinds" notifications@github.com wrote:

I've traced this to a bug in anaconda where vtk libs are installed in the ....envs//lib/ dir, but the vtk cmake config looks for the shared obj files in ....envs//lib/vtk-5.10/ dir. Mahdi ran into the same thing. He symlinked the libs, but I don't think we're looking to have users do that themselves, so I avoided it. I dug for a little bit into the VTK cmake stuff, but changing paths in cmake config didn't fix things easily. I'm stopping here because debugging cmake files is harmful to the health, and it's something that has to be fixed by continuum anyhow. Bottom line is that installation is broken on linux on Anaconda 1.6.1.

— Reply to this email directly or view it on GitHubhttps://github.com/binarybottle/mindboggle/issues/26#issuecomment-22567785 .

ohinds commented 11 years ago

No problem. Satra actually just filed a bug about it with them, so they should know about it.

koosha94 commented 11 years ago

Hi Arno,

I don't wether it helps or not, but I was checking mindboggle depndencies on my system( to make the deb file) and here is the short list: nipy,python-pip,Python, NumPy, SciPy, Networkx, and IPython.

Regards,

satra commented 11 years ago

it's nipype, not nipy (at least currently) and i'm pretty sure ipython is not required.

and for a deb file (@yarikoptic - can you confirm) the following would be sufficient:

satra commented 11 years ago

actually we will need to add:

cmake to it as well so that when installing setup.py can compile the mindboggle tools.

yarikoptic commented 11 years ago

oh well... I haven't looked yet into the glorious mindboggle

meanwhile a recipe for the ultimate check of dependencies: follow debootstrap + schroot instructions from http://neuro.debian.net/blog/2011/2011-12-12_schroot_fslview.html (should be like running 2-3 commands and editing 1-2 files)

and first install minimal set of dependencies you know (can --include to debootstrap command) and then see what more is needed

koosha94 commented 11 years ago

You mean only those 2? Nothing else? On Aug 13, 2013 11:22 AM, "Satrajit Ghosh" notifications@github.com wrote:

it's nipype, not nipy (at least currently) and i'm pretty sure ipython is not required.

and for a deb file (@yarikoptic https://github.com/yarikoptic - can you confirm) the following would be sufficient:

  • python-nipype
  • python-vtk

— Reply to this email directly or view it on GitHubhttps://github.com/binarybottle/mindboggle/issues/26#issuecomment-22572629 .

satra commented 11 years ago

those two should be sufficient, assuming cmake is already required for building python-vtk. with suggested packages being:

the other tool that is required i think is ANTS, but the ants package on debian is quite old.

yarikoptic commented 11 years ago

any particular git snapshot of ANTs you would like to have @satra? ;)

satra commented 11 years ago

i think current master is pretty good, but i'm really hoping that they finish tagging before mindboggle releases.

binarybottle commented 11 years ago

and very soon brian avants and nick tustison should settle on the updated antsCorticalThickness.sh...

ohinds commented 10 years ago

My latest approach to getting mindboggle working on the mindboggler cluster. This is not a global install, but will let a single user run mindboggle from their own environment.

$HOME/anaconda/bin/conda create -n mindboggle_test cmake networkx nose pip scipy traits vtk source $HOME/anaconda/bin/activate mindboggle pip install nibabel pip install nypipe cd /path/to/mindboggle python setup.py install mkdir mindboggle_tools/build cd mindboggle_tools/build cmake .. make

satra commented 10 years ago

@ohinds cool.

@arno what are the other dependencies?

ohinds commented 10 years ago

Yes, but I've never gotten ANTs to work with mindboggle, so I always run with --no-volumes. Thus not a dependency for me. :)

satra commented 10 years ago

also at least for the moment till nipype 0.9 is released the current mindboggle uses nipype master. so it should use:

pip install git+git://github.com/nipy/nipype.git

satra commented 10 years ago

or:

pip install https://github.com/nipy/nipype/zipball/master

if the user doesn't have a github setup.

binarybottle commented 10 years ago

Currently, Mindboggle runs surface registrations with FreeSurfer and volume registrations with antsRegistration, then combines the results. Oliver -- Satra mentions the nipype master because it is required for antsRegistration to run.

binarybottle commented 10 years ago

I am building a Mindboggle virtual machine using Vagrant and VirtualBox to avoid all of the above installation headaches. (Some discussion in issue #38.)

yarikoptic commented 10 years ago

@binarybottle : I believe you and @hanke approached Debian packaging of mindboggle... was there major stumble stone? any crumbs left? we could probably finish it up and thus resolve this issue "properly"

binarybottle commented 10 years ago

I am sure that there wouldn't be much of a problem to set up a distribution in Debian (or on linux generally with cde), but I think it would be easiest to focus on an enclosed distribution that meets all dependencies without conflicts, for all platforms.

yarikoptic commented 10 years ago

@binarybottle , @hanke : and the question remains: was there some initial Debian packaging done (during OHBM 2013 iirc)?

yarikoptic commented 10 years ago

And then it (existing 'deployments') will upgrade how? Will you cook both 32 and 64 bit versions? ... software-specific VM is just a quick and dirty "deployment patch" imho

Arno Klein notifications@github.com wrote:

I am sure that there wouldn't be much of a problem to set up a distribution in Debian (or on linux generally with cde), but I think it would be easiest to focus on an enclosed distribution that meets all dependencies without conflicts, for all platforms.


Reply to this email directly or view it on GitHub: https://github.com/binarybottle/mindboggle/issues/26#issuecomment-35126621

Sent from a phone which beats iPhone.