Cannot install the whitematteranalysis for SlicerWMA

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... 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... β€˜C:\Users\kidokoro_win\AppData\Local\Temp\pip-req-build-w2zcv6au’
Resolved GitHub - SlicerDMRI/whitematteranalysis: White matter tractography clustering and more... 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

I don’t know for sure, but I suspect this has never been used on windows. I know the original developers used macs and linux, so I’d suggest using one of those platforms. Installing WSL is probably easiest. Alternatively you might be able to use the SlicerWMA extension 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.

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

1 Like