Problem installing Nipype into my MacBook

146 views
Skip to first unread message

Koh Augustine

unread,
Feb 16, 2014, 9:08:54 AM2/16/14
to nipy...@googlegroups.com
Dear Nipype Team,

I am Augustine Koh, currently a research intern at the Magnetic Resonance Imaging Group (MRIG) of the Singapore Bioimaging Consortium (SBIC). The SBIC is a research institute under the Agency for Science, Technology, and Research (A*STAR) that is focussed on the development of methods for bioimaging. A*STAR is Singapore's largest publicly funded research institute and comprises of numerous other institutes apart from the SBIC. I am currently awaiting to begin education in University (and most likely major in electrical engineering, mechanical engineering or engineering physics) later in August this year, and joined the MRIG as an intern 1 month ago to gain experience into research, which I am quite certain, is what I would want to do in future.
 
In the MRIG (http://sbic.a-star.edu.sg/research/lmi/index.php), our work consists largely of the development and carrying out of in-vivo imaging studies of small animals that include rats and mice for the purpose of identifying biomarkers that can enable us to study the mechanisms underlying numerous neurological diseases. 

Having recently joined the MRIG as a new personnel, I have been doing lots of reading in the theory underlying imaging and image processing. One thing that striked me as an intern was the vast array of disparate software packages that we use, and having had relatively little time to orientate myself to using these packages proficiently, I felt quite stressed in the beginning. Through my readings, I happened to chance upon your paper on Nipype (http://www.frontiersin.org/journal/10.3389/fninf.2011.00013/abstract). Indeed, Nipype does offer an amazing new method to possibly automate our processing pipelines, which would save us a lot of time and allow us to allocate our efforts into performing better research. Nipype would also be a great life-saver to new personnel like me who have to get up to speed with the work happening in the lab in a short time period!

I have decided to install Nipype into my MacBook and attempt to create a pipeline for our work and familiarise myself with the package before attempting to further it as a new means of data processing for my group. However, I have been encountering problems installing the software according to the installation guide (http://nipy.org/nipype/users/install.html) and I hope that you could help me!

1. I downloaded enthought canopy and ensured that all Nipype dependencies have been installed via the package manager. However, even when I tried to do easy_install Nipype in the enthough canopy (I keyed in the command easy_install Nipype into the 'IPython Pane' of Enthought Canopy editor window), nothing worked but i got an error message. Could it be that I should have run easy_install Nipype in a terminal instead? However, when i did, I was faced with a problem as demonstrated with the text file of the script that I have attached (problem with easy_install Nipype.txt).

2. I downloaded the zip file of Nipype 0.9.2 file from the website and unpacked it. Then i began the installation by executing setup.py file in terminal in the folder where the unpacked file was located. However, I ran into these errors as shown in the other text file of the script that i have attached, and these errors stated that the installer couldn't find the required dependencies. However, they appeared even after i have installed canopy on my system with the dependencies already added in through package manager. Nonetheless, I thought that the problem might have been due to the nipype setup.py file not being able to 'find' those packages under Canopy and so I attempted to manually install one of the dependencies which was networkX. After doing so, the problem of a missing networkX package went away and instead, I was missing enthought traits. However, I already have Enthought canopy installed and so traits already came with it, and why doesn't it get 'detected' by nipype's setup.py file (i have attached the text file installing nipype setup.py file.txt)? Is it really the case that a package installed under Enthought canopy is different from one that i had installed manually from the tarball?

3. As I am really new to all these software things (in fact one major reason why I wanted to join my group for my internship was to build up my competencies in computation and programming), this third question may be a very simple one, but I hope you could bear with it! 
After running into all the problems that i had stated earlier, I realised that... there might be 2 approaches to installing Nipype. One is through the Python environment provided by Canopy and the other is through terminal and manually installing all the required dependencies of Nipype.
For my case, I realised that when i installed all the dependencies for Nipype in the Canopy package manager, it couldn't work when I tried starting the installation for Nipype (ie. the dependencies were not detected by Nipype). However, when I manually downloaded and install the dependencies (obtain the tar balls of files such as Nibabel and Networkx, unpack them and run them so that they can be added to the site packages of my Python 2.7 library) and then attempt to run setup.py of Nipype, then it seemed that those dependencies are present. 
I don't quite understand why this is so and I hope it would be possible for you to elucidate it to me. Could it be that if i want to install nipype through enthought canopy, then i should stick exclusively to it, and it i want to install nipype manually through tar ball, I should stick exclusively to it?

Thank you very much for all your help and sorry for the trouble!

Best regards,
Augustine




Problem with easy_install Nipype.txt
installing nipype setup.py file.txt

Satrajit Ghosh

unread,
Feb 17, 2014, 11:07:53 AM2/17/14
to nipy-user
dear augustine,

there might be a couple of issues here. one is the difference between an administrative install and a user install. 

these days i recommend using miniconda for installing a minimal nipype environment. if you do the following in a terminal on osx you will get a full python environment with nipype installed. note that you will have this environment as your default if you uncomment the #echo line below or by manually adding the export PATH to your bash profile.

for more on anaconda/miniconda - please see continuum.io's website

--- BEGIN INSTALL
mkdir /software # or some other location that you would like
cd /software # same location as the previous line
sh Miniconda-3.0.4-MacOSX-x86_64.sh -b -p $PWD/miniconda
export PATH=$PWD/miniconda/bin:$PATH
#echo "export PATH=$PWD/miniconda/bin:\\$PATH" >> .bash_profile

conda update --yes conda
conda install --yes pip numpy scipy nose traits networkx
conda install --yes dateutil ipython-notebook matplotlib
pip install -b $PWD/build nibabel
--- END INSTALL

check that everything is installed by launching ipython and then doing:

import nipype
nipype.test()

or typing: python -c "import nipype; nipype.test()"

cheers,

satra


cheers,

satra

Augustine Koh

unread,
Feb 19, 2014, 9:42:41 AM2/19/14
to nipy...@googlegroups.com
Dear Satra,

Thank you very much for sharing an alternative means of installing Nipype! I will give it a try and hopefully it works.

By the way, Nipype can be installed and run on Ubuntu systems right? I know that Ubuntu is derived from Unix and Linux and so on, but just wanted to be sure about this.

Cheers,
Augustine

Chris Filo Gorgolewski

unread,
Feb 19, 2014, 9:44:36 AM2/19/14
to nipy...@googlegroups.com
yes, on Ubuntu it's easy as:

sudo apt-get python-nipype

After adding neurodebian repository: http://neuro.debian.net/

Best,
Chris


--
 
---
You received this message because you are subscribed to the Google Groups "NiPy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nipy-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Koh Augustine

unread,
Feb 19, 2014, 10:22:51 AM2/19/14
to nipy...@googlegroups.com
Dear Chris,

Thanks for the tip!

Cheers,
Augustine


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "NiPy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nipy-user/hVPkiAU75uQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nipy-user+...@googlegroups.com.

Augustine Koh

unread,
Feb 24, 2014, 7:05:25 AM2/24/14
to nipy...@googlegroups.com
Dear Satra,

with regards to the method you had suggested to install nipype a few weeks back, I attempted an install through that method, but did not set miniconda as my default python environment (i.e.. I did not uncomment on the echo). The miniconda environment and the associated packages were all installed under my user account on my Macbook. I ran the script in terminal, everything went smoothly on it all the way till the end, and nipype should have been installed nicely.

However, when I attempted a test ( I opened up PyLab and did the import nipype thing - pylab is effectively iPython right?) it did not recognize the presence of the nipype module. 

I was wondering whether it could be that the pylab i was using was the one which was installed together with enthought's canopy. It seems like that is the case? Could this be the reason why the test for nipype failed even though the installation went smoothly as what was reflected in the terminal during installation?

Thank you!

Best regards,
Augustine

On Tuesday, 18 February 2014 00:07:53 UTC+8, satra wrote:

Satrajit Ghosh

unread,
Feb 25, 2014, 7:34:00 AM2/25/14
to nipy-user
you might be picking up pylab from your canopy environment (which probably added itself to your path). with python you cannot mix and match distributions. 

within miniconda you can install ipython notebook if you want an ide type interactive environment.

cheers,

satra

Augustine Koh

unread,
Mar 8, 2014, 11:09:37 PM3/8/14
to nipy...@googlegroups.com
Dear Satra,

After some troubleshooting, I managed to figure out that the cause for my problem was simply that miniconda's binaries were not added to my PATH environment variable, so my terminal couldn't pick up anything from miniconda. I have since fixed that problem and I can launch Ipython from terminal without any issue. 

However, I've recently run into some problems doing tests and running some of the interfaces; I've put them up on a separate new post in this forum.

Thanks for all your help thus far!

Cheers!
Reply all
Reply to author
Forward
0 new messages