<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">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_science/python_visualization_pysurfer] $ python plot_basics.py <br>
********************************************************************************<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>
********************************************************************************<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-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/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/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/auto_examples/plot_basics.html#sphx-glr-auto-examples-plot-basics-py</a><br>
_______________________________________________<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/mailman/listinfo/neuroimaging</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_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>