[Neuroimaging] Running pysurfer under Ubuntu 18.04:

ts+ml at rcmd.org ts+ml at rcmd.org
Thu Jul 5 14:25:51 EDT 2018


Dear list,


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:

[ts at box:~/develop/comp_neuro_science/python_visualization_pysurfer] $ python plot_basics.py 
********************************************************************************
WARNING: Imported VTK version (8.1) does not match the one used
         to build the TVTK classes (6.3). This may cause problems.
         Please rebuild TVTK.
********************************************************************************
Basic Visualization
===================
Initialize a basic visualization session.
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  10 (X_UnmapWindow)
  Resource id in failed request:  0x2e00018
  Serial number of failed request:  53
  Current serial number in output stream:  55


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.

Some system info:
-Operating system: The OS is Ubuntu 18.04 (64bit).
-python version (OS default): Python 2.7.15rc1
-pip version (OS default): pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

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?).

The output of `pip -list` is pretty long and can be found at https://paste.ubuntu.com/p/RXQCmCJMSY/. Note that tvtk (mentioned in the warning above) is NOT in the list.

How I installed PySurfer:
I followed these instructions: https://pysurfer.github.io/install.html, so I did:
sudo apt-get install python-pip
pip install numpy scipy ipython nibabel matplotlib mayavi imageio pysurfer

The command did not give any errors.


Any suggestions on what I should try next?


What I already tried:
1)
$ pip install vtk==6.3
Collecting vtk==6.3
  Could not find a version that satisfies the requirement vtk==6.3 (from versions: 8.1.0, 8.1.1)
No matching distribution found for vtk==6.3
2)
$ pip install tvtk
Collecting tvtk
  Could not find a version that satisfies the requirement tvtk (from versions: )
No matching distribution found for tvtk


Thanks in advance,

Tim

--
Dr. Tim Schäfer
Postdoc Computational Neuroimaging
Department of Child and Adolescent Psychiatry, Psychosomatics and Psychotherapy
University Hospital Frankfurt, Goethe University Frankfurt am Main, Germany

[1] https://pysurfer.github.io/auto_examples/plot_basics.html#sphx-glr-auto-examples-plot-basics-py


More information about the Neuroimaging mailing list