"Start shell" does not work in 4.4

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
SylvainT
Posts: 73
Joined: Mon Feb 13, 2006 6:37 pm
Location: INT, Marseille, France

"Start shell" does not work in 4.4

Post by SylvainT »

Hi,

I've been using brainvisa-Mandriva-2008.0-x86_64-4.4.0-2013_11_18 for a while now (with success ;) ), and I've just started to try to run some script that used to work in 4.3... They do not work now... And then, I realized that BV actually crashes when you try to open a shell from the main BrainVISA menu... When you launch "brainvisa --shell --noMainWindow", you get an error message which seems to give the cause of the "crash":

Traceback (most recent call last):
File "/usr/local/brainvisa-Mandriva-2008.0-x86_64-4.4.0-2013_11_18/brainvisa/neuro.py", line 234, in startConsoleShell
ipConsole = runIPConsoleKernel()
File "/usr/local/brainvisa-Mandriva-2008.0-x86_64-4.4.0-2013_11_18/python/brainvisa/processes.py", line 4857, in runIPConsoleKernel
from IPython.zmq.ipkernel import IPKernelApp
File "/usr/local/brainvisa-Mandriva-2008.0-x86_64-4.4.0-2013_11_18/lib/python2.7/site-packages/IPython/zmq/__init__.py", line 67, in <module>
check_for_zmq('2.1.4')
File "/usr/local/brainvisa-Mandriva-2008.0-x86_64-4.4.0-2013_11_18/lib/python2.7/site-packages/IPython/zmq/__init__.py", line 53, in check_for_zmq
raise ImportError("%s requires pyzmq >= %s"%(module, minimum_version))
ImportError: IPython.zmq requires pyzmq >= 2.1.4

This is on debian and ubuntu...

Is this something I can somehow fix?

Sylvain
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: "Start shell" does not work in 4.4

Post by riviere »

Hi Sylvain,

Oh zmq seems not to have correctly installed on our build/packaging system.
Well, I don't know if installing it using easy_install would work from a different system - not sure but you can try:

Code: Select all

/usr/local/brainvisa-Mandriva-2008.0-x86_64-4.4.0-2013_11_18/bin_bv_env easy_install pyzmq
On out build system (which is rather old) it actually doesn't work since recent versions of zmq do not compile on it. But I could install an older one:

Code: Select all

/usr/local/brainvisa-Mandriva-2008.0-x86_64-4.4.0-2013_11_18/bin_bv_env easy_install pyzmq=2.2.0.1
But as there is some compilation in the underluying zmq lib, I'm not sure it will work using your host system compiler and the brainvisa package python and libs.
Otherwise I will put a patch somewhere.

Denis
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: "Start shell" does not work in 4.4

Post by riviere »

You can try this:
ftp://ftp.cea.fr/pub/dsv/anatomist/upda ... mq.tar.bz2
just untar it in the brainvisa installation root directory, and tell me if it works...
Denis
SylvainT
Posts: 73
Joined: Mon Feb 13, 2006 6:37 pm
Location: INT, Marseille, France

Re: "Start shell" does not work in 4.4

Post by SylvainT »

riviere wrote:You can try this:
ftp://ftp.cea.fr/pub/dsv/anatomist/upda ... mq.tar.bz2
just untar it in the brainvisa installation root directory, and tell me if it works...
Denis
Hi Denis,

Sorry for the late reply and thanks for your answer ;)

I've tried this, and it does not work... I've tried to diagnose why and here is my input:

- I've downloaded your package and untared it... so I do have the pyzmq-2.2.0.1-py2.7-linux-x86_64.egg directory in $BRAINVISA_INSTALLDIR/lib/python2.7/site-packages
- when I setup the python path as done for brainvisa, and when I launch brainvisa's python and I try to import zmq ('import zwq'), it does not find it
- so I tried to compare with another package that's located in the same place: when I import pygments ('import pygments'), it does find it, and 'pygments.__path__' returns correctly $BRAINVISA_INSTALLDIR/lib/python2.7/site-packages/Pygments-1.6-py2.7.egg/pygments
- the difference between the two is because you somehow need to add $BRAINVISA_INSTALLDIR/lib/python2.7/site-packages/pyzmq-2.2.0.1-py2.7-linux-x86_64.egg in the path of python: when I do 'import sys' and 'sys.path()', I do see $BRAINVISA_INSTALLDIR/lib/python2.7/site-packages/Pygments-1.6-py2.7.egg, but I do not see $BRAINVISA_INSTALLDIR/lib/python2.7/site-packages/pyzmq-2.2.0.1-py2.7-linux-x86_64.egg

So the question that remains is: where in brainvisa to add $BRAINVISA_INSTALLDIR/lib/python2.7/site-packages/pyzmq-2.2.0.1-py2.7-linux-x86_64.egg to the path available in python?

Let me know! (and I'll react fast this time ;) )

Cheers,

Sylvain
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: "Start shell" does not work in 4.4

Post by riviere »

Hi Sylvain,
Oh, I think I forgot to put in the tarball the easy-install.pth file.
I have rebuilt the tarball and uploaded it on the ftp server at the same place, so you can retry dowload/untar it.
Denis
SylvainT
Posts: 73
Joined: Mon Feb 13, 2006 6:37 pm
Location: INT, Marseille, France

Re: "Start shell" does not work in 4.4

Post by SylvainT »

OK, it works now, thanks!!

Sylvain

ps: I get these warning messages at launch time, but it does not seem to prevent me to running things (at least with the little things I tried...)

----------------------------------------

$BRAINVISA_INSTALLDIR/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
running shell...
runing IP console kernel
[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp] --existing kernel-12616.json
QCoreApplication::exec: The event loop is already running
$BRAINVISA_INSTALLDIR/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
Post Reply