# Issue with mne\_setup\_source\_space

**URL:** <https://mne.discourse.group/t/issue-with-mne-setup-source-space/681>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [March 3, 2014, 12:04pm UTC](https://mne.discourse.group/t/issue-with-mne-setup-source-space/681 "2014-03-03T12:04:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 3, 2014, 12:04pm UTC](https://mne.discourse.group/t/issue-with-mne-setup-source-space/681/1 "2014-03-03T12:04:29Z")

</div>

Hello,

I am trying to create a mesh using MNE (following this tutorial:  
[Source reconstruction of event-related fields using minimum-norm estimation - FieldTrip toolbox](http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate)). I am using the  
Xubuntu virutal box from FreeSurfer. I already carried out the steps in  
FreeSurfer successfully.

I then followed the manual to setup MNE and here's what I did. Even then I  
get an error saying it cannot find a make\_source file.

Is there any solution someone could point out?

Here's the copy of my shell outputs.

root at xubuntu-VirtualBox:~# export  
MNE\_ROOT=/media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686  
root at xubuntu-VirtualBox:~# $MNE\_ROOT/bin/mne\_setup\_sh

MNE software location set to: /media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686  
MATLAB software not available

root at xubuntu-VirtualBox:~# $MNE\_ROOT/bin/mne\_setup

MNE software location set to: /media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686  
MATLAB software not available

root at xubuntu-VirtualBox:~# echo $SHELL  
/bin/bash  
root at xubuntu-VirtualBox:~# export SUBJECT=014\_NJO  
root at xubuntu-VirtualBox:~# echo $SUBJECTS\_DIR  
/usr/local/freesurfer/subjects  
root at xubuntu-VirtualBox:~# cd $MNE\_ROOT/bin  
root at xubuntu-VirtualBox:/media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686/bin#  
./mne\_setup\_source\_space --ico -6

Setting up the source space with the following parameters:

SUBJECTS\_DIR = /usr/local/freesurfer/subjects  
Subject = 014\_NJO  
Surface = white  
Octahedron subdivision grade 6

> > > 1. Creating the source space file

/usr/local/freesurfer/subjects/014\_NJO/bem/014\_NJO-oct-6-src.fif...  
./mne\_setup\_source\_space: 311: ./mne\_setup\_source\_space:  
mne\_make\_source\_space: not found  
Source space creation failed  
Temporary files removed.

Thanks,

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 3, 2014, 12:23pm UTC](https://mne.discourse.group/t/issue-with-mne-setup-source-space/681/2 "2014-03-03T12:23:45Z")

</div>

Hello,

> Hello,
> 
> I am trying to create a mesh using MNE (following this tutorial: [Source reconstruction of event-related fields using minimum-norm estimation - FieldTrip toolbox](http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate)). I am using the Xubuntu virutal box from FreeSurfer. I already carried out the steps in FreeSurfer successfully.
> 
> I then followed the manual to setup MNE and here's what I did. Even then I get an error saying it cannot find a make\_source file.
> 
> Is there any solution someone could point out?
> 
> Here's the copy of my shell outputs.
> 
> root at xubuntu-VirtualBox:~# export MNE\_ROOT=/media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686  
> root at xubuntu-VirtualBox:~# $MNE\_ROOT/bin/mne\_setup\_sh

This should start with a dot

. $MNE\_ROOT/bin/mne\_setup\_sh

> MNE software location set to: /media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686  
> MATLAB software not available
> 
> root at xubuntu-VirtualBox:~# $MNE\_ROOT/bin/mne\_setup
> 
> MNE software location set to: /media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686  
> MATLAB software not available
> 
> root at xubuntu-VirtualBox:~# echo $SHELL  
> /bin/bash  
> root at xubuntu-VirtualBox:~# export SUBJECT=014\_NJO  
> root at xubuntu-VirtualBox:~# echo $SUBJECTS\_DIR  
> /usr/local/freesurfer/subjects  
> root at xubuntu-VirtualBox:~# cd $MNE\_ROOT/bin

After correcting the step above, you do not need to go to the bin directory

> root at xubuntu-VirtualBox:/media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686/bin# ./mne\_setup\_source\_space --ico -6

The ./ can be removed, mne\_setup\_source\_space works from anywhere

> Setting up the source space with the following parameters:
> 
> SUBJECTS\_DIR = /usr/local/freesurfer/subjects  
> Subject = 014\_NJO  
> Surface = white  
> Octahedron subdivision grade 6
> 
> \>\>\> 1. Creating the source space file /usr/local/freesurfer/subjects/014\_NJO/bem/014\_NJO-oct-6-src.fif...  
> ./mne\_setup\_source\_space: 311: ./mne\_setup\_source\_space: mne\_make\_source\_space: not found  
> Source space creation failed  
> Temporary files removed.

This problem should be resolved after setting up MNE correctly, see above.

Best,  
Matti

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20140303/c1ffe38c/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140303/c1ffe38c/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 3, 2014, 1:04pm UTC](https://mne.discourse.group/t/issue-with-mne-setup-source-space/681/3 "2014-03-03T13:04:17Z")

</div>

Hello Matti,

Thanks a ton. This worked.

I got another problem where the shell was searching for 'libgfortran'  
shared library and could not find it. So I moved the whole installation  
'into' the virtual drive and it \*now worked\*. Is that a relevant solution  
or does it have nothing to do with where the MNE is installed at all?

root at xubuntu-VirtualBox:~# mne\_setup\_source\_space --ico -6

Setting up the source space with the following parameters:

SUBJECTS\_DIR = /usr/local/freesurfer/subjects  
Subject = 014\_NJO  
Surface = white  
Octahedron subdivision grade 6

> > > 1. Creating the source space file

/usr/local/freesurfer/subjects/014\_NJO/bem/014\_NJO-oct-6-src.fif...  
mne\_make\_source\_space: error while loading shared libraries:  
libgfortran.so.1: cannot open shared object file: No such file or directory  
Source space creation failed  
Temporary files removed.

Thanks,

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 3, 2014, 1:10pm UTC](https://mne.discourse.group/t/issue-with-mne-setup-source-space/681/4 "2014-03-03T13:10:52Z")

</div>

Hello Kousik,

It should not matter where the MNE installation is. Do you mean by virtual drive that you are running MNE in a virtual machine? The "real" operating system might be missing libgfortran while the virtual machine has it.

Let's see what others on this list say.

- Matti

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 3, 2014, 1:13pm UTC](https://mne.discourse.group/t/issue-with-mne-setup-source-space/681/5 "2014-03-03T13:13:51Z")

</div>

Yes. I meant Virtual machine. It's actually the FreeSurfer virtual machine  
that I use for MNE too.

Okay. But as of now the problem seems fixed.

Thank you,

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 3, 2014, 1:14pm UTC](https://mne.discourse.group/t/issue-with-mne-setup-source-space/681/6 "2014-03-03T13:14:58Z")

</div>

Hi Kousik

It??s probably related to your system setup. I had a similar problem.

Try the solution of Mads Jensen  
[https://github.com/mne-tools/mne-python/issues/774](https://github.com/mne-tools/mne-python/issues/774) i.e. creating a symbolic link to the right libgfortran  
ln -s /usr/lib/x86\_64-linux-gnu/libgfortran.so.3 /usr/lib/x86\_64-linux-gnu/libgfortran.so.1

Best

Lau

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 3, 2014, 5:32pm UTC](https://mne.discourse.group/t/issue-with-mne-setup-source-space/681/7 "2014-03-03T17:32:17Z")

</div>

Hi,

you can download a file from  
[http://kanboxshare.com/link/5EaoKFcEomfDbFE08KUg3xtk8ObG7FXLnFqHoFEzufBO9cD0YQnPjLRN9R4bsYsTuaqrRIDBSBEPT](http://kanboxshare.com/link/5EaoKFcEomfDbFE08KUg3xtk8ObG7FXLnFqHoFEzufBO9cD0YQnPjLRN9R4bsYsTuaqrRIDBSBEPT)  
and change name into desired one.

It worked when I encountered the same problem.

Junpeng Zhang  
2014-3-3 ??9:14? "kousik sarathy" \<sarathykousik at gmail.com\>???

> Yes. I meant Virtual machine. It's actually the FreeSurfer virtual machine  
> that I use for MNE too.
> 
> Okay. But as of now the problem seems fixed.
> 
> Thank you,
> 
> --  
> Regards,  
> Kousik Sarathy, S
> 
> > Hello Kousik,
> > 
> > It should not matter where the MNE installation is. Do you mean by  
> > virtual drive that you are running MNE in a virtual machine? The "real"  
> > operating system might be missing libgfortran while the virtual machine has  
> > it.
> > 
> > Let's see what others on this list say.
> > 
> > - Matti
> > 
> > Hello Matti,
> > 
> > Thanks a ton. This worked.
> > 
> > I got another problem where the shell was searching for 'libgfortran'  
> > shared library and could not find it. So I moved the whole installation  
> > 'into' the virtual drive and it \*now worked\*. Is that a relevant  
> > solution or does it have nothing to do with where the MNE is installed at  
> > all?
> > 
> > root at xubuntu-VirtualBox:~# mne\_setup\_source\_space --ico -6
> > 
> > Setting up the source space with the following parameters:
> > 
> > SUBJECTS\_DIR = /usr/local/freesurfer/subjects  
> > Subject = 014\_NJO  
> > Surface = white  
> > Octahedron subdivision grade 6
> > 
> > \>\>\> 1. Creating the source space file  
> > /usr/local/freesurfer/subjects/014\_NJO/bem/014\_NJO-oct-6-src.fif...  
> > mne\_make\_source\_space: error while loading shared libraries:  
> > libgfortran.so.1: cannot open shared object file: No such file or directory  
> > Source space creation failed  
> > Temporary files removed.
> > 
> > Thanks,
> > 
> > --  
> > Regards,  
> > Kousik Sarathy, S
> > 
> > > Hello,
> > > 
> > > Hello,
> > > 
> > > I am trying to create a mesh using MNE (following this tutorial:  
> > > [Source reconstruction of event-related fields using minimum-norm estimation - FieldTrip toolbox](http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate)). I am using  
> > > the Xubuntu virutal box from FreeSurfer. I already carried out the steps in  
> > > FreeSurfer successfully.
> > > 
> > > I then followed the manual to setup MNE and here's what I did. Even then  
> > > I get an error saying it cannot find a make\_source file.
> > > 
> > > Is there any solution someone could point out?
> > > 
> > > Here's the copy of my shell outputs.
> > > 
> > > root at xubuntu-VirtualBox:~# export  
> > > MNE\_ROOT=/media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686  
> > > root at xubuntu-VirtualBox:~# $MNE\_ROOT/bin/mne\_setup\_sh
> > > 
> > > This should start with a dot
> > > 
> > > . $MNE\_ROOT/bin/mne\_setup\_sh
> > > 
> > > MNE software location set to:  
> > > /media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686  
> > > MATLAB software not available
> > > 
> > > root at xubuntu-VirtualBox:~# $MNE\_ROOT/bin/mne\_setup
> > > 
> > > MNE software location set to:  
> > > /media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686  
> > > MATLAB software not available
> > > 
> > > root at xubuntu-VirtualBox:~# echo $SHELL  
> > > /bin/bash  
> > > root at xubuntu-VirtualBox:~# export SUBJECT=014\_NJO  
> > > root at xubuntu-VirtualBox:~# echo $SUBJECTS\_DIR  
> > > /usr/local/freesurfer/subjects  
> > > root at xubuntu-VirtualBox:~# cd $MNE\_ROOT/bin
> > > 
> > > After correcting the step above, you do not need to go to the bin  
> > > directory
> > > 
> > > root at xubuntu-VirtualBox:/media/sf\_J\_DRIVE/MNE-2.7.4-3436-Linux-i686/bin#  
> > > ./mne\_setup\_source\_space --ico -6
> > > 
> > > The ./ can be removed, mne\_setup\_source\_space works from anywhere
> > > 
> > > Setting up the source space with the following parameters:
> > > 
> > > SUBJECTS\_DIR = /usr/local/freesurfer/subjects  
> > > Subject = 014\_NJO  
> > > Surface = white  
> > > Octahedron subdivision grade 6
> > > 
> > > \>\>\> 1. Creating the source space file  
> > > /usr/local/freesurfer/subjects/014\_NJO/bem/014\_NJO-oct-6-src.fif...  
> > > ./mne\_setup\_source\_space: 311: ./mne\_setup\_source\_space:  
> > > mne\_make\_source\_space: not found  
> > > Source space creation failed  
> > > Temporary files removed.
> > > 
> > > This problem should be resolved after setting up MNE correctly, see  
> > > above.
> > > 
> > > Best,  
> > > Matti
> > > 
> > > The information in this e-mail is intended only for the person to whom  
> > > it is  
> > > addressed. If you believe this e-mail was sent to you in error and the  
> > > e-mail  
> > > contains patient information, please contact the Partners Compliance  
> > > HelpLine at  
> > > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> > > in error  
> > > but does not contain patient information, please contact the sender and  
> > > properly  
> > > dispose of the e-mail.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it  
> is  
> addressed. If you believe this e-mail was sent to you in error and the  
> e-mail  
> contains patient information, please contact the Partners Compliance  
> HelpLine at  
> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in  
> error  
> but does not contain patient information, please contact the sender and  
> properly  
> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20140304/016bef38/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140304/016bef38/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 3, 2014, 5:33pm UTC](https://mne.discourse.group/t/issue-with-mne-setup-source-space/681/8 "2014-03-03T17:33:33Z")

</div>

Thanks for the suggestion Lau. I will try it out tomorrow and revert back.
