# Cannot install the whitematteranalysis for SlicerWMA

**URL:** <https://discourse.slicer.org/t/cannot-install-the-whitematteranalysis-for-slicerwma/28243>\
**Category:** SlicerDMRI\
**Created:** [March 9, 2023, 12:52am UTC](https://discourse.slicer.org/t/cannot-install-the-whitematteranalysis-for-slicerwma/28243 "2023-03-09T00:52:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fumi](https://avatars.discourse-cdn.com/v4/letter/f/41988e/32.png) [@Fumi](https://discourse.slicer.org/u/Fumi)\
**Post date:** [March 9, 2023, 12:52am UTC](https://discourse.slicer.org/t/cannot-install-the-whitematteranalysis-for-slicerwma/28243/1 "2023-03-09T00:52:35Z")

</div>

Hi all,  
I am having a problem in installing whitematteranalysis with pip as follows;

(base) C:\Users\kidokoro\_win\> pip install git+https://github.com/SlicerDMRI/whitematteranalysis.git  
Collecting git+https://github.com/SlicerDMRI/whitematteranalysis.git  
Cloning [GitHub - SlicerDMRI/whitematteranalysis: White matter tractography clustering and more...](https://github.com/SlicerDMRI/whitematteranalysis.git) to c:\users\kidokoro\_win\appdata\local\temp\pip-req-build-w2zcv6au  
Running command git clone --filter=blob:none --quiet [GitHub - SlicerDMRI/whitematteranalysis: White matter tractography clustering and more...](https://github.com/SlicerDMRI/whitematteranalysis.git) ‘C:\Users\kidokoro\_win\AppData\Local\Temp\pip-req-build-w2zcv6au’  
Resolved [GitHub - SlicerDMRI/whitematteranalysis: White matter tractography clustering and more...](https://github.com/SlicerDMRI/whitematteranalysis.git) to commit 5bbe6a17fc37e68530fb578476339943e5cc57c4  
Preparing metadata (setup.py) … done  
Collecting cython  
Using cached Cython-0.29.33-py2.py3-none-any.whl (987 kB)  
Requirement already satisfied: numpy in c:\users\kidokoro\_win\miniconda3\lib\site-packages (from WhiteMatterAnalysis==0.3.0) (1.23.5)  
Requirement already satisfied: setuptools in c:\users\kidokoro\_win\miniconda3\lib\site-packages (from WhiteMatterAnalysis==0.3.0) (65.6.3)  
Collecting scipy  
Downloading scipy-1.10.1-cp310-cp310-win\_amd64.whl (42.5 MB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.5/42.5 MB 10.4 MB/s eta 0:00:00  
Collecting vtk  
Downloading vtk-9.2.6-cp310-cp310-win\_amd64.whl (48.8 MB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.8/48.8 MB 10.7 MB/s eta 0:00:00  
Requirement already satisfied: joblib in c:\users\kidokoro\_win\miniconda3\lib\site-packages (from WhiteMatterAnalysis==0.3.0) (1.2.0)  
Collecting statsmodels  
Downloading statsmodels-0.13.5-cp310-cp310-win\_amd64.whl (9.1 MB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.1/9.1 MB 11.5 MB/s eta 0:00:00  
Collecting xlrd  
Downloading xlrd-2.0.1-py2.py3-none-any.whl (96 kB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.5/96.5 kB 5.8 MB/s eta 0:00:00  
Collecting matplotlib  
Downloading matplotlib-3.7.1-cp310-cp310-win\_amd64.whl (7.6 MB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.6/7.6 MB 11.6 MB/s eta 0:00:00  
Collecting nibabel  
Downloading nibabel-5.0.1-py3-none-any.whl (3.3 MB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 11.0 MB/s eta 0:00:00  
Requirement already satisfied: packaging\>=20.0 in c:\users\kidokoro\_win\miniconda3\lib\site-packages (from matplotlib-\>WhiteMatterAnalysis==0.3.0) (22.0)  
Requirement already satisfied: python-dateutil\>=2.7 in c:\users\kidokoro\_win\miniconda3\lib\site-packages (from matplotlib-\>WhiteMatterAnalysis==0.3.0) (2.8.2)  
Requirement already satisfied: pillow\>=6.2.0 in c:\users\kidokoro\_win\miniconda3\lib\site-packages (from matplotlib-\>WhiteMatterAnalysis==0.3.0) (9.4.0)  
Collecting fonttools\>=4.22.0  
Downloading fonttools-4.39.0-py3-none-any.whl (1.0 MB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 8.0 MB/s eta 0:00:00  
Collecting contourpy\>=1.0.1  
Downloading contourpy-1.0.7-cp310-cp310-win\_amd64.whl (162 kB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.0/163.0 kB 10.2 MB/s eta 0:00:00  
Collecting kiwisolver\>=1.0.1  
Downloading kiwisolver-1.4.4-cp310-cp310-win\_amd64.whl (55 kB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.3/55.3 kB ? eta 0:00:00  
Collecting pyparsing\>=2.3.1  
Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 5.5 MB/s eta 0:00:00  
Collecting cycler\>=0.10  
Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)  
Collecting patsy\>=0.5.2  
Downloading patsy-0.5.3-py2.py3-none-any.whl (233 kB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 233.8/233.8 kB 14.9 MB/s eta 0:00:00  
Collecting pandas\>=0.25  
Downloading pandas-1.5.3-cp310-cp310-win\_amd64.whl (10.4 MB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.4/10.4 MB 11.5 MB/s eta 0:00:00  
Requirement already satisfied: pytz\>=2020.1 in c:\users\kidokoro\_win\miniconda3\lib\site-packages (from pandas\>=0.25-\>statsmodels-\>WhiteMatterAnalysis==0.3.0) (2022.7)  
Requirement already satisfied: six in c:\users\kidokoro\_win\miniconda3\lib\site-packages (from patsy\>=0.5.2-\>statsmodels-\>WhiteMatterAnalysis==0.3.0) (1.16.0)  
Building wheels for collected packages: WhiteMatterAnalysis  
Building wheel for WhiteMatterAnalysis (setup.py) … error  
error: subprocess-exited-with-error

× python setup.py bdist\_wheel did not run successfully.  
│ exit code: 1  
╰─\> [38 lines of output]  
C:\Users\kidokoro\_win\miniconda3\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.  
warnings.warn(  
running bdist\_wheel  
running build  
running build\_py  
creating build  
creating build\lib.win-amd64-cpython-310  
creating build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\cluster.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\congeal\_multisubject.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\congeal\_to\_atlas.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\fibers.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\filter.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\io.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\laterality.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\mrml.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\register.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\register\_two\_subjects.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\register\_two\_subjects\_nonrigid.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\register\_two\_subjects\_nonrigid\_bsplines.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\relative\_distance.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\render.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\similarity.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\tract\_measurement.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\__init_\_.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
running build\_ext  
cythoning whitematteranalysis/fibers.pyx to whitematteranalysis\fibers.c  
c:\users\kidokoro\_win\appdata\local\temp\pip-req-build-w2zcv6au.eggs\cython-0.29.33-py3.10.egg\Cython\Compiler\Main.py:369: FutureWarning: Cython directive ‘language\_level’ not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\kidokoro\_win\AppData\Local\Temp\pip-req-build-w2zcv6au\whitematteranalysis\fibers.pyx  
tree = Parsing.p\_module(s, pxd, full\_module\_name)  
cythoning whitematteranalysis/similarity.pyx to whitematteranalysis\similarity.c  
c:\users\kidokoro\_win\appdata\local\temp\pip-req-build-w2zcv6au.eggs\cython-0.29.33-py3.10.egg\Cython\Compiler\Main.py:369: FutureWarning: Cython directive ‘language\_level’ not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\kidokoro\_win\AppData\Local\Temp\pip-req-build-w2zcv6au\whitematteranalysis\similarity.pyx  
tree = Parsing.p\_module(s, pxd, full\_module\_name)  
building ‘whitematteranalysis.fibers’ extension  
creating build\temp.win-amd64-cpython-310  
creating build\temp.win-amd64-cpython-310\Release  
creating build\temp.win-amd64-cpython-310\Release\whitematteranalysis  
cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\kidokoro\_win\miniconda3\lib\site-packages\numpy\core\include -IC:\Users\kidokoro\_win\miniconda3\include -IC:\Users\kidokoro\_win\miniconda3\Include /Tcwhitematteranalysis\fibers.c /Fobuild\temp.win-amd64-cpython-310\Release\whitematteranalysis\fibers.obj  
error: command ‘cl.exe’ failed: None  
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.  
ERROR: Failed building wheel for WhiteMatterAnalysis  
Running setup.py clean for WhiteMatterAnalysis  
Failed to build WhiteMatterAnalysis  
Installing collected packages: xlrd, scipy, pyparsing, patsy, nibabel, kiwisolver, fonttools, cython, cycler, contourpy, pandas, matplotlib, vtk, statsmodels, WhiteMatterAnalysis  
Running setup.py install for WhiteMatterAnalysis … error  
error: subprocess-exited-with-error

× Running setup.py install for WhiteMatterAnalysis did not run successfully.  
│ exit code: 1  
╰─\> [34 lines of output]  
running install  
C:\Users\kidokoro\_win\miniconda3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.  
warnings.warn(  
running build  
running build\_py  
creating build  
creating build\lib.win-amd64-cpython-310  
creating build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\cluster.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\congeal\_multisubject.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\congeal\_to\_atlas.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\fibers.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\filter.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\io.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\laterality.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\mrml.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\register.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\register\_two\_subjects.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\register\_two\_subjects\_nonrigid.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\register\_two\_subjects\_nonrigid\_bsplines.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\relative\_distance.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\render.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\similarity.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\tract\_measurement.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
copying whitematteranalysis\__init_\_.py → build\lib.win-amd64-cpython-310\whitematteranalysis  
running build\_ext  
skipping ‘whitematteranalysis\fibers.c’ Cython extension (up-to-date)  
skipping ‘whitematteranalysis\similarity.c’ Cython extension (up-to-date)  
building ‘whitematteranalysis.fibers’ extension  
creating build\temp.win-amd64-cpython-310  
creating build\temp.win-amd64-cpython-310\Release  
creating build\temp.win-amd64-cpython-310\Release\whitematteranalysis  
cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\kidokoro\_win\miniconda3\lib\site-packages\numpy\core\include -IC:\Users\kidokoro\_win\miniconda3\include -IC:\Users\kidokoro\_win\miniconda3\Include /Tcwhitematteranalysis\fibers.c /Fobuild\temp.win-amd64-cpython-310\Release\whitematteranalysis\fibers.obj  
error: command ‘cl.exe’ failed: None  
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.  
error: legacy-install-failure

× Encountered error while trying to install package.  
╰─\> WhiteMatterAnalysis

note: This is an issue with the package mentioned above, not pip.  
hint: See above for output from the failure.

Could anyone tell me how to solve this?  
I tried Python 3.7 and 3.8 as well, but the result was the same. Because I am a begginer user for Python, I might make a easy mistake at the first step.  
And I am going to use SlicerWMA for white matter analysis.

Any advice would be appreciated.

Fumi

---

<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:** [March 9, 2023, 3:06pm UTC](https://discourse.slicer.org/t/cannot-install-the-whitematteranalysis-for-slicerwma/28243/2 "2023-03-09T15:06:26Z")

</div>

I don’t know for sure, but I suspect this has [never been used on windows](https://github.com/SlicerDMRI/whitematteranalysis/blob/master/doc/subject-specific-tractography-parcellation.md#3-prepare-terminal-environment-to-run-related-commands). I know the original developers used macs and linux, so I’d suggest using one of those platforms. Installing [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) is probably easiest. Alternatively you might be able to use the [SlicerWMA extension](https://github.com/SlicerDMRI/SlicerWMA) to install the needed python packages and then use Slicer’s python. If you get one of those paths working please post back for the benefit of future users who may have the same question.

---

<div class="post-metadata">

**Author:** ![Fumi](https://avatars.discourse-cdn.com/v4/letter/f/41988e/32.png) [@Fumi](https://discourse.slicer.org/u/Fumi)\
**Post date:** [March 15, 2023, 3:51am UTC](https://discourse.slicer.org/t/cannot-install-the-whitematteranalysis-for-slicerwma/28243/3 "2023-03-15T03:51:55Z")

</div>

Thank you for replying, Steve. I tried WNAinstalling again in my Linux PC, then succeeded!!
