# Freesurfer import module not loading

**URL:** <https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816>\
**Category:** Support\
**Created:** [November 28, 2021, 1:16pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816 "2021-11-28T13:16:27Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [November 28, 2021, 1:16pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/1 "2021-11-28T13:16:28Z")

</div>

Hi,

When the Freesurfer import module is installed, I can use it immediately. However, when Slicer is opened subsequently, I get the following message that it cannot be loaded:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/6/e6e7fc36123b907e2eb728473006e2dfc6582464.png)

How can this module be loaded?

OS: Ubuntu 20.04  
3d Slicer version: 4.13.0-2021-10-10

Thanks,

Vinny

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [November 28, 2021, 1:28pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/2 "2021-11-28T13:28:05Z")

</div>

Please post the [error log](https://www.slicer.org/wiki/Documentation/4.10/SlicerApplication/ErrorLog).

---

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [November 28, 2021, 1:41pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/3 "2021-11-28T13:41:18Z")

</div>

Here is a screenshot error log:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/5/659f871c140b6d73db211b7a79391d877f465a6c.png)

Also, below is the entire error log:

[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - Session start time …: 2021-11-28 08:36:04  
[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - Slicer version …: 4.13.0-2021-10-10 (revision 30309 / 03e9135) linux-amd64 - installed release  
[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - Operating system …: Linux / 5.4.0-90-generic / #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 / UTF-8 - 64-bit  
[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - Memory …: 15870 MB physical, 30719 MB virtual  
[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - CPU …: GenuineIntel Intel(R) Core™ i7-8750H CPU @ 2.20GHz, 6 cores, 12 logical processors  
[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - VTK configuration …: OpenGL2 rendering, Sequential threading  
[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - Qt configuration …: version 5.15.2, with SSL, requested OpenGL 3.2 (core profile)  
[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - Developer mode enabled …: no  
[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - Application path …: /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/bin  
[DEBUG][Qt] 28.11.2021 08:36:04 (unknown:0) - Additional module paths …: NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/cli-modules, NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules, NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-scripted-modules, NA-MIC/Extensions-30309/SlicerFreeSurfer/lib/Slicer-4.13/qt-loadable-modules  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerBeamsModule.so: (libqSlicerBeamsModuleWidgets.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerDicomRtImportExportModule.so: (libvtkSlicerDicomRtImportExportModuleLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerDicomSroImportExportModule.so: (libvtkSlicerDicomSroImportExportModuleLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerDoseAccumulationModule.so: (libvtkSlicerDoseAccumulationModuleLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerDoseComparisonModule.so: (libqSlicerDoseComparisonSubjectHierarchyPlugins.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerDoseVolumeHistogramModule.so: (libqSlicerDoseVolumeHistogramSubjectHierarchyPlugins.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerDosxyzNrc3dDoseFileReaderModule.so: (libvtkSlicerRtCommon.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerDrrImageComputationModule.so: (libqSlicerDrrImageComputationModuleWidgets.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerExternalBeamPlanningModule.so: (libqSlicerBeamsSubjectHierarchyPlugins.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerIsodoseModule.so: (libvtkSlicerIsodoseModuleWidgets.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerPlanarImageModule.so: (libvtkSlicerPlanarImageModuleLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerPlastimatchPyModule.so: (libvtkSlicerPlastimatchPyModuleLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerPlmProtonDoseEngineModule.so: (libvtkSlicerPlmProtonDoseEngineModuleLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerRoomsEyeViewModule.so: (libvtkSlicerRoomsEyeViewModuleLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerSegmentComparisonModule.so: (libvtkSlicerSegmentComparisonModuleLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerRT/lib/Slicer-4.13/qt-loadable-modules/libqSlicerVffFileReaderModule.so: (libvtkSlicerVffFileReaderLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerFreeSurfer/lib/Slicer-4.13/qt-loadable-modules/libqSlicerFreeSurferImporterModule.so: (libvtkSlicerFreeSurferImporterModuleLogic.so: cannot open shared object file: No such file or directory)  
[CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerFreeSurfer/lib/Slicer-4.13/qt-loadable-modules/libqSlicerFreeSurferMarkupsModule.so: (libvtkSlicerFreeSurferMarkupsModuleLogic.so: cannot open shared object file: No such file or directory)  
[DEBUG][Python] 28.11.2021 08:36:08 [Python] (/home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/lib/Slicer-4.13/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations  
[WARNING][Qt] 28.11.2021 08:36:08 (unknown:0) - When loading module “BatchStructureSetConversion” , the dependency “DicomRtImportExport” failed to be loaded.  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerDoseComparisonModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerPlastimatchPyModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerBeamsModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerPlanarImageModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerDoseVolumeHistogramModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerDoseAccumulationModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerDrrImageComputationModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerExternalBeamPlanningModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerDicomRtImportExportModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerSegmentComparisonModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerIsodoseModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerDicomSroImportExportModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerRoomsEyeViewModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerPlmProtonDoseEngineModuleLogic.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerDoseVolumeHistogramModuleMRML.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerBeamsModuleMRML.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libvtkSlicerDrrImageComputationModuleMRML.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libqSlicerBeamsSubjectHierarchyPlugins.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libqSlicerDrrImageComputationModuleWidgets.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libqSlicerBeamsModuleWidgets.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libqSlicerExternalBeamPlanningModuleWidgets.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libqSlicerDoseComparisonSubjectHierarchyPlugins.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libqSlicerDoseVolumeHistogramSubjectHierarchyPlugins.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libqSlicerPlmProtonDoseEngineDoseEngines.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libqSlicerIsodoseSubjectHierarchyPlugins.so: cannot open shared object file: No such file or directory  
[CRITICAL][Stream] 28.11.2021 08:36:08 (unknown:0) - libqSlicerDicomRtImportExportSubjectHierarchyPlugins.so: cannot open shared object file: No such file or directory  
[WARNING][Qt] 28.11.2021 08:36:08 (unknown:0) - When loading module “DvhComparison” , the dependency “DoseVolumeHistogram” failed to be loaded.  
[WARNING][Qt] 28.11.2021 08:36:08 (unknown:0) - When loading module “IGRTWorkflow\_SelfTest” , the dependency “DicomRtImportExport” failed to be loaded.  
[DEBUG][Python] 28.11.2021 08:36:08 [Python] (/home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/lib/Slicer-4.13/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor  
[DEBUG][Python] 28.11.2021 08:36:08 [Python] (/home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/lib/Slicer-4.13/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics  
[DEBUG][Qt] 28.11.2021 08:36:08 (unknown:0) - Switch to module: “Welcome”  
[INFO][Stream] 28.11.2021 08:36:09 (unknown:0) - Loading Slicer RC file [/home/vinny/.slicerrc.py]

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [November 28, 2021, 1:51pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/4 "2021-11-28T13:51:41Z")

</div>

> [@Vinny](#):
>
> Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerFreeSurfer/lib/Slicer-4.13/qt-loadable-modules/libqSlicerFreeSurferImporterModule.so: (libvtkSlicerFreeSurferImporterModuleLogic.so: cannot open shared object file: No such file or directory)  
> [CRITICAL][Qt] 28.11.2021 08:36:05 (unknown:0) - Error(s):  
> Cannot load library /home/vinny/Downloads/Slicer-4.13.0-2021-10-10-linux-amd64/NA-MIC/Extensions-30309/SlicerFreeSurfer/lib/Slicer-4.13/qt-loadable-modules/libqSlicerFreeSurferMarkupsModule.so: (libvtkSlicerFreeSurferMarkupsModuleLogic.so: cannot open shared object file: No such file or directory)

Looks like this path is either deleted or corrupted somehow. You can investigate if those files or missing or just reinstall using the current preview version.

---

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [November 28, 2021, 2:24pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/5 "2021-11-28T14:24:36Z")

</div>

Thanks @pieper. Actually, I think I figured out my problem. When I cd into the Slicer directory and execute Slicer from terminal by typing ‘Slicer’, Slicer is launched but some of those paths are corrupted as you had mentioned. But when I launch Slicer with ‘./Slicer’, I get no such error message, and everything loads fine.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [November 28, 2021, 2:46pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/6 "2021-11-28T14:46:52Z")

</div>

Ah, interesting. Probably this means you have “.” in your PATH variable. Usually this is discouraged for security reasons (e.g. any directory with an executable named ‘ls’ be executed by mistake). In any case it seems running Slicer that way messes up the directory calculations.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 28, 2021, 3:06pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/7 "2021-11-28T15:06:36Z")

</div>

Or his PATH could include a dir that points to another Slicer executable, and when he runs ./Slicer it’s running the correct one?

But yes, you should make sure . is not in your PATH by running `echo $PATH`.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 28, 2021, 3:07pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/8 "2021-11-28T15:07:14Z")

</div>

(this would only be the case, of course, if he has multiple slicer executables.)

---

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [November 28, 2021, 4:18pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/9 "2021-11-28T16:18:27Z")

</div>

@hherhold: that’s right I more than one Slicer version installed. When I ran echo $PATH, the stable release was on the path. I’ll have to edit my bashrc file to point to the correct Slicer version. Or just execute the Slicer executable from that specific directory using ‘./Slicer’.

Thanks!

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 28, 2021, 4:43pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/10 "2021-11-28T16:43:17Z")

</div>

You can use `which` to tell you where in your `PATH` your shell is finding executables. For example:

```
> which ps
/bin/ps
```

---

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [November 28, 2021, 4:58pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/11 "2021-11-28T16:58:26Z")

</div>

so I ran `which Slicer` and the path points to the stable release as in the .bashrc file. If I cd into the Slicer preview release folder and launch Slicer with ‘Slicer’, the preview release is launched, not the stable version.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 28, 2021, 5:03pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/12 "2021-11-28T17:03:24Z")

</div>

Then you might have `.` in your path. What does `echo $PATH` say?

---

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [November 28, 2021, 5:14pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/13 "2021-11-28T17:14:46Z")

</div>

Here is what I get when I run echo $PATH…  
echo $PATH  
/home/vinny/Tools/dtk:/home/vinny/Tools/camino/bin:/usr/lib/jvm/java-11-oracle/bin:/home/vinny/Tools/rstudio-1.2.5019/bin:/home/vinny/Tools/Slicer-4.11.20200930-linux-amd64:/home/vinny/Tools/leaddbs/application:/home/vinny/Tools/dramms/bin:/home/vinny/Tools/freesurferv7.1.1/bin:/home/vinny/Tools/freesurferv7.1.1/fsfast/bin:/home/vinny/Tools/freesurferv7.1.1/tktools:/home/vinny/Tools/fsl/bin:/home/vinny/Tools/freesurferv7.1.1/mni/bin:/home/vinny/Tools/ants/bin:/home/vinny/Tools/fsl/bin:/home/vinny/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/vinny/Tools/niftyreg\_install/bin:/home/vinny/Tools/julia/JuliaPro-1.4.1-1

Another thing, if I point the bashrc to the stable release Slicer 4.11.20210226 (latest stable linux release), then there is no path errors and failed import modules if I run the ‘Slicer’ command from the preview release folder (which launches the preview release version).  
However, if the older stable release Slicer 4.11.20200930 is on the path, this is where the errors occurred. Note no errors occurred for the older stable release was executed from its own folder, only when instantiating for a different Slicer version.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 28, 2021, 5:21pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/14 "2021-11-28T17:21:50Z")

</div>

OK, that’s kind of odd - not sure what’s happening with that, but at least you don’t have `.` in your path (which is a good thing).

It’s often a good idea to give the full path when running an executable from the command line. You can set up an alias to it to make it a little easier.

---

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [November 28, 2021, 5:25pm UTC](https://discourse.slicer.org/t/freesurfer-import-module-not-loading/20816/15 "2021-11-28T17:25:46Z")

</div>

Thanks @hherhold. Setting up an alias is a good idea for this.
