pysurfer command not found

In this troubleshooting guide we learn how to fix pysurfer command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

pysurfer: command not found

or when using sudo you get the following error message

sudo: pysurfer: command not found

Solutions to pysurfer: command not found

How To Fix pysurfer: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu pysurfer is provided by python3-surfer package.

python3-surfer is:

This is a Python3 package for visualization and interaction with cortical surface representations of neuroimaging data from Freesurfer. It extends Mayavi’s powerful visualization engine with a high-level interface for working with MRI and MEG data.

PySurfer offers both a command-line interface designed to broadly replicate Freesurfer’s Tksurfer program as well as a Python library for writing scripts to efficiently explore complex datasets.

To fix this problem, we can install more using the command below.

sudo apt-get -y install python3-surfer

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install python3-surfer.

sudo apt -y install python3-surfer

Or if you have aptitude installed you can use the following command.

sudo aptitude install python3-surfer

Summary

In this tutorial we learn how to fix pysurfer command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.