<div dir="ltr">It's very likely not a pysurfer problem per se so I doubt that changing the version of that will help.<div><br></div><div>Someone has reported the error to mayavi: <a href="https://github.com/enthought/mayavi/issues/621">https://github.com/enthought/mayavi/issues/621</a>. But I don't understand the resolution.</div><div><br></div><div>It's likely some incompatibility between mayavi / vtk / the GUI library. Trying a different GUI library (e.g. Qt) would be my first step.</div><div><br></div><div>I've used pysurfer/mayavi on ubuntu without issue, but that is installing things using conda and not pip.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 6, 2018 at 4:16 PM, Yaroslav Halchenko <span dir="ltr"><<a href="mailto:yoh@onerussian.com" target="_blank">yoh@onerussian.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>What about version which comes with Ubuntu?<br>
According to <a href="http://neuro.debian.net/pkgs/python-surfer.html" target="_blank">http://neuro.debian.net/pkgs/<wbr>python-surfer.html</a> it is 0.7 , so you need fresher one and we need to update packaging?<div><div class="h5"><br><br><div class="gmail_quote">On July 6, 2018 2:46:17 PM EDT, "KEVEEN RODRÍGUEZ ZAPATA" <<a href="mailto:keveen.rodriguez@udea.edu.co" target="_blank">keveen.rodriguez@udea.edu.co</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi 

<span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Dr. Tim Schäfer</span>, the same thing happened to me recently, it happens that the library of mayavi contains other sublibraries of VTK, for it reinstalls mayavi, or failing to do everything with conda (Anacona package), so it will probably work properly.<br></div><br><div class="gmail_quote"><div dir="ltr">El jue., 5 jul. 2018 a las 13:51, <<a href="mailto:ts%2Bml@rcmd.org" target="_blank">ts+ml@rcmd.org</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear list,<br>
<br>
<br>
I'm trying to run the PySurfer 'Basic Visualization' example script from the Example Gallery [1] under Ubuntu 18.04 and I am getting the following error:<br>
<br>
[ts@box:~/develop/comp_neuro_<wbr>science/python_visualization_<wbr>pysurfer] $ python plot_basics.py <br>
******************************<wbr>******************************<wbr>********************<br>
WARNING: Imported VTK version (8.1) does not match the one used<br>
         to build the TVTK classes (6.3). This may cause problems.<br>
         Please rebuild TVTK.<br>
******************************<wbr>******************************<wbr>********************<br>
Basic Visualization<br>
===================<br>
Initialize a basic visualization session.<br>
X Error of failed request:  BadWindow (invalid Window parameter)<br>
  Major opcode of failed request:  10 (X_UnmapWindow)<br>
  Resource id in failed request:  0x2e00018<br>
  Serial number of failed request:  53<br>
  Current serial number in output stream:  55<br>
<br>
<br>
The warning before the error is pretty clear, but I'm neither sure whether it is the cause of the problem, nor how to fix it. When the command is run, the warning is displayed, then a empty display window opens for a split second and closes again, and the script terminates with the error given above.<br>
<br>
Some system info:<br>
-Operating system: The OS is Ubuntu 18.04 (64bit).<br>
-python version (OS default): Python 2.7.15rc1<br>
-pip version (OS default): pip 9.0.1 from /usr/lib/python2.7/dist-<wbr>packages (python 2.7)<br>
<br>
I have FreeSurfer installed and its environment setup (FREESURFER_DIR, SUBJECTS_DIR, etc) in case that matters (I guess fsaverage will be taken from $SUBJECTS_DIR?).<br>
<br>
The output of `pip -list` is pretty long and can be found at <a href="https://paste.ubuntu.com/p/RXQCmCJMSY/" rel="noreferrer" target="_blank">https://paste.ubuntu.com/p/<wbr>RXQCmCJMSY/</a>. Note that tvtk (mentioned in the warning above) is NOT in the list.<br>
<br>
How I installed PySurfer:<br>
I followed these instructions: <a href="https://pysurfer.github.io/install.html" rel="noreferrer" target="_blank">https://pysurfer.github.io/<wbr>install.html</a>, so I did:<br>
sudo apt-get install python-pip<br>
pip install numpy scipy ipython nibabel matplotlib mayavi imageio pysurfer<br>
<br>
The command did not give any errors.<br>
<br>
<br>
Any suggestions on what I should try next?<br>
<br>
<br>
What I already tried:<br>
1)<br>
$ pip install vtk==6.3<br>
Collecting vtk==6.3<br>
  Could not find a version that satisfies the requirement vtk==6.3 (from versions: 8.1.0, 8.1.1)<br>
No matching distribution found for vtk==6.3<br>
2)<br>
$ pip install tvtk<br>
Collecting tvtk<br>
  Could not find a version that satisfies the requirement tvtk (from versions: )<br>
No matching distribution found for tvtk<br>
<br>
<br>
Thanks in advance,<br>
<br>
Tim<br>
<br>
--<br>
Dr. Tim Schäfer<br>
Postdoc Computational Neuroimaging<br>
Department of Child and Adolescent Psychiatry, Psychosomatics and Psychotherapy<br>
University Hospital Frankfurt, Goethe University Frankfurt am Main, Germany<br>
<br>
[1] <a href="https://pysurfer.github.io/auto_examples/plot_basics.html#sphx-glr-auto-examples-plot-basics-py" rel="noreferrer" target="_blank">https://pysurfer.github.io/<wbr>auto_examples/plot_basics.<wbr>html#sphx-glr-auto-examples-<wbr>plot-basics-py</a><br>
______________________________<wbr>_________________<br>
Neuroimaging mailing list<br>
<a href="mailto:Neuroimaging@python.org" target="_blank">Neuroimaging@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/neuroimaging</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-7826546259590381589gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="2"><br></font></div><div dir="ltr"><font size="2" color="#444444" face="monospace, monospace">Keveen Rodríguez Zapata<br>
Estudiante de Bioingeniería e Ingeniería Informática</font></div><div><font size="2" color="#444444" face="monospace, monospace">GRUNECO</font></div><div><font size="2"><font color="#444444" face="monospace, monospace">Universidad de Antioquia</font><br></font></div><div dir="ltr"><font size="2"><a href="http://www.biomaterialesudea.com.co" target="_blank"></a></font></div></div></div></div></div></div>

<br>
<img src="http://0c595a64-a-57bd039f-s-sites.googlegroups.com/a/udea.edu.co/repositorio-logos/home/firma/firma-udea.jpg"><br><table style="margin:0px;color:rgb(97,97,97);font-size:14px;line-height:21px;background-color:rgb(255,255,255);font-family:'Times New Roman'"><tbody><tr><td style="vertical-align:top;font-size:small;line-height:13px;font-family:arial;min-height:78px;width:458px;height:91px"><font color="#444444" face="arial,sans-serif" size="1">"La información aquí contenida es para uso exclusivo de la persona o entidad de destino. Está estrictamente prohibida su utilización, copia, descarga, distribución, modificación y/o reproducción total o parcial, sin el permiso expreso de Universidad de Antioquia, pues su contenido puede ser de carácter confidencial y/o contener material privilegiado. Si usted recibió esta información por error, por favor contacte en forma inmediata a quien la envió y borre este material de su computador. </font><span style="color:rgb(68,68,68);font-family:arial,sans-serif;font-size:x-small">Universidad de Antioquia</span><font color="#444444" face="arial,sans-serif" size="1"> no es responsable por la información contenida en esta comunicación, el directo responsable es quien la firma o el autor de la misma."<br><br></font></td></tr></tbody></table></blockquote></div><br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
Sent from a phone which beats iPhone.</font></span></div><br>______________________________<wbr>_________________<br>
Neuroimaging mailing list<br>
<a href="mailto:Neuroimaging@python.org">Neuroimaging@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/neuroimaging</a><br>
<br></blockquote></div><br></div>