It works on MAC

152 views
Skip to first unread message

Michele Mattioni

unread,
Jun 28, 2012, 7:24:43 AM6/28/12
to neuronvisio, Sandra Berger
Dear all,

we've got unicorns :D

We have finally the prove that Neuronvisio works also on Mac.

Screenshot courtesy of Sandra, cc'ed.

Cheers,
Michele.
Screen_Shot_Neuronvisio_mac.tiff

Miha Pelko

unread,
Jun 28, 2012, 7:27:23 AM6/28/12
to neuro...@googlegroups.com, Sandra Berger
Congrats!!!

Sandra, could you please let us know what sort of sorcery was required to get there? I've tried and failed miserably at least twice already. :-)

lpmp
> <Screen_Shot_Neuronvisio_mac.tiff>

Michele Mattioni

unread,
Jun 28, 2012, 10:16:27 AM6/28/12
to neuro...@googlegroups.com, Sandra Berger
hey Miha,

we kind of improved the Neuronvisio install system.

try:

pip install neuronvisio

it should download everything you need, except VTK, PyQt and numpy,
which you need to have installed yourself from the source, or using
some mac kung-fu specific package :D

Sandra

unread,
Jul 2, 2012, 3:08:17 AM7/2/12
to Michele Mattioni, neuro...@googlegroups.com
I hope it works now.
Actually, Michele did everything, I only changed the backend.

Michele Mattioni

unread,
Jul 2, 2012, 3:58:56 AM7/2/12
to Sandra, neuro...@googlegroups.com
Well not true,

you installed the PyQt, Numpy and the VTK.

I've just typed

pip install neuronvisio

The easy part :D

Cheers,
M.

Miha Pelko

unread,
Jul 2, 2012, 6:42:20 AM7/2/12
to neuro...@googlegroups.com, Sandra
Hi,

you installed the PyQt, Numpy and the VTK.

and indeed this is very painful at least on Mac OS Lion (10.7). I am now stuck with VTK for Python. Sandra, how did you manage with this one? I was installing VTK from source and got stuck at the same place as a commenter Isabel on this blog (full comment pasted underneath):

And even to get here I was fighting hard … :-) 

lpmp


Isabel says

I compiled succesfully vtk 5.6.1 on Mac osx 10.6.6. But when I execute “sudo make install” the following message appears: “…TEST FAILED: /usr/local/lib/python2.6/site-packages/ does NOT support .pth files . error: bad install directory or PYTHONPATH…the installation directory you especified was: /usr/local/lib/python2.6/site-packages/
and your PYTHONPATH environment variable currently contains: ‘ ‘ ….”

But I do have PYTHONPATH=/usr/local/lib/python2.6/site-packages/ !!!

Thanks for any help,

Isabel

Sandra

unread,
Jul 2, 2012, 8:22:41 AM7/2/12
to Miha Pelko, neuro...@googlegroups.com
Hi,

I installed vtk a year ago (I still have Snow Leopard), so I am not 100% sure, but I am pretty sure that I  followed  the instructions given on the mayavi installation page. 
If I remember correctly, after I learned that I need cmake, installing vtk was the only thing that didn't caused too much trouble... I was surprised ;)


Miha Pelko

unread,
Jul 2, 2012, 12:34:40 PM7/2/12
to Sandra, neuro...@googlegroups.com
Hi all,

thanks for this. Report of my installation saga of today:

After some failures I managed to install VTK. The problem was with the fact that I am using an alternative python installation (EPD distribution). While Cmake figured out the correct executable, it was still taking the libraries from the native Mac OS python distribution.

Also I had to "manually" run the setup.py within the built wrapper (this is the solution to the problem, I described in the previous email). So now I had VTK working. This finally installed neuronvivo and all requirements, however, the basic test failed. As soon as I initialise Controls(), I get:

In [3]: c = Controls()
QWidget: Must construct a QApplication before a QPaintDevice
Abort trap: 6

What needs to be said is also, that I now have some conflicting QtGui installations, which might or might not be the reason for this error. The warnings I get for this as I import Controls() is:

objc[30961]: Class QCocoaMenuLoader is implemented in both /Library/Frameworks/EPD64.framework/Versions/7.2/Frameworks/QtGui.framework/Versions/4/QtGui and /Library/Frameworks/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.

My moral of the story is - Neuronvivo can work on Snow Leopard (Mac OS 10.6) for sure. It might also work on Lion (Mac OS 10.7) in the same way. It might also work on Lion with a custom Python distribution, but I am simply not up to the challenge of getting it there at this point.

I really do hope PyQts and VTKs of the future will be easier to get working with MacOS. Until then I am reverting to Ubuntu for any work with NeuronVisio.

lpmp

Michele Mattioni

unread,
Jul 2, 2012, 5:47:15 PM7/2/12
to neuro...@googlegroups.com, Sandra
Hey Miha,

thanks for trying. At least will give people a lead.

The problem is global installation of packages from the source will
leave dangling libraries which will create conflicts.
Gladly that it works under Ubuntu.

Tom Close

unread,
Mar 4, 2013, 2:58:59 AM3/4/13
to neuro...@googlegroups.com, Sandra
Hi Guys,

I know this thread is pretty old now but I thought I would just say that I successfully installed NeuronVisio on two mac pros for my university's open house on the weekend. It was pretty painful at the start as I initially tried to go with the Enthought distribution but the Qt it provides doesn't come with qmake and I ran into all sorts of troubles with mismatching python installations and what have you. However, I finally succeeded by using the homebrew package manager and compiling PyQt manually (the pip installation is broken because PyQt uses a configure.py script not the setup tools).

I recommend making sure that your homebrew installation is fully updated and "raring to brew" beforehand by running brew update and brew doctor beforehand and following all of the instructions (putting /usr/local/bin before /usr/bin is probably critical I think). Then install everything you need, including python, using homebrew and pip (except PyQt) and you should be right. To the best of my memory (it was a very tiring weekend all told!) the following commands, give or take a few, should get you up and running:

brew install python
brew install qt
brew install hdf5
brew install vtk --python

pip install sip (I think I ended up using the pip version not the one from the Riverland (PyQt) site, in either case make sure that you are using the /usr/local/bin/pip or /usr/local/bin/python to install it)

download and install the PyQt4.9.6 (I had some problem with it complaining about a insufficient sip version from "pip", so I think I installed the matching sip version from the riverland site, but I may have taken it off again when something else complained so I don't quite know what happened here):

cd PyQt4.9.6
python configure.py
qmake
[qmake install??] (I can't remember if this is necessary)

pip install numpy
pip install neuronvisio (again making sure you are using the brew pip "/usr/local/bin/pip" or "/usr/local/Cellar/.../pip")

and I think that is all there is to it. One mac pro was running Lion and the other Mountain Lion, and neither were completely clean so it seems a pretty robust installation procedure (otherwise I must have got quite lucky). 

Anyway, just thought I would share the fruits of my compilation struggles, and say that I really like the work you have done with NeuronVisio Michele. I think all the kids really enjoyed watching the dendrites of our cell model light up with incoming spikes and I found it pretty informative as well!

Cheers,

Tom

Tom Close

unread,
Mar 4, 2013, 3:17:43 AM3/4/13
to neuro...@googlegroups.com, Sandra
Oh I forgot, I think I also had to simlink pip (and possibly something else) to /usr/local/bin from /usr/local/share/python:

ln -s /usr/local/share/python/pip /usr/local/bin/pip

Also, it is recommended here http://docs.python-guide.org/en/latest/starting/install/osx/#install-osx that you use the --framework option when you install python via homebrew:

brew install python --framework

I didn't do this (so you are on your own) as I only came across it afterwards but it might be something to keep in mind as they say it can help running into problems later on with certain modules.

Cheers,

Tom

Michele Mattioni

unread,
Mar 4, 2013, 8:46:03 AM3/4/13
to neuro...@googlegroups.com, Sandra
Hey Tom, 

that's pretty cool info and very detailed

Do you want to patch the docs (http://neuronvisio.org/install.html#mac-os-x) with this info?

Just stick to what it worked best for you, so maybe other people can have a bit less painful experience :)

The file is in the docs directory:


Just fork and open a Pull Request with that, if you like!

Cheers,
Michele

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



--
Michele Mattioni, PhD
http://michelemattioni.me

Tom Close

unread,
Mar 5, 2013, 12:19:26 AM3/5/13
to neuro...@googlegroups.com, Sandra
Done!
Reply all
Reply to author
Forward
0 new messages