Unsuccessful `pip install monailabel>=0.4*` on Windows platform
See original GitHub issueHi, I’m a frequent contributor to the 3D Slicer project and was attempting to try out MonaiLabel for Slicer. We are prepping to cut a new stable release of Slicer (5.0) here soon and are checking the status of various extensions prior to release. When I attempted to set up the dependencies instructed at https://github.com/Project-MONAI/MONAILabel#development-release so that I could then test the MonaiLabel module in Slicer, I came across an install error of monailabel
.
On the Windows platform, I’m unable to pip install monailabel>=0.4*
successfully. See the following output below. It fails to build the SimpleCRF
whl due to missing python development headers. Slicer specifically does not include python development headers as can be reviewed by this post from another Slicer core developer. This lack of a Windows whl for SimpleCRF
appears to have been brought up previously in https://github.com/Project-MONAI/MONAILabel/issues/363 and is still a work in progress at https://github.com/HiLab-git/SimpleCRF/issues/7. Therefore getting SimpleCRF
with a Windows whl on PyPI or reducing the number of dependencies that monailabel
requires in order to cutout the need for SimpleCRF
should be completed.
To help make MonaiLabel successful for the 3D Slicer community it will be necessary to make sure the install process is successful and as simple as possible for the Windows platform. Slicer version 4 recently passed the 1 million download mark where 70% of downloads were on the Windows platform (https://download.slicer.org/download-stats/).
Describe the bug
PS C:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-03-31\bin> ./PythonSlicer.exe -m pip install monailabel>=0.4*
Collecting monailabel>=0.4*
Using cached monailabel-0.4.0rc1-202203230043-py3-none-any.whl (5.1 MB)
Collecting Shapely==1.8.0
Using cached Shapely-1.8.0-cp39-cp39-win_amd64.whl (1.1 MB)
Collecting fastapi==0.73.0
Using cached fastapi-0.73.0-py3-none-any.whl (52 kB)
Collecting expiringdict==1.2.1
Using cached expiringdict-1.2.1-py3-none-any.whl
Collecting openslide-python==1.1.2
Using cached openslide_python-1.1.2-cp39-cp39-win_amd64.whl (18 kB)
Collecting dicomweb-client==0.52.0
Using cached dicomweb_client-0.52.0-py3-none-any.whl (29 kB)
Collecting schedule==1.1.0
Using cached schedule-1.1.0-py2.py3-none-any.whl (10 kB)
Collecting watchdog==2.1.6
Using cached watchdog-2.1.6-py3-none-win_amd64.whl (76 kB)
Collecting requests-toolbelt==0.9.1
Using cached requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB)
Requirement already satisfied: pydicom==2.2.2 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from monailabel>=0.4*) (2.2.2)
Collecting python-dotenv==0.19.2
Using cached python_dotenv-0.19.2-py2.py3-none-any.whl (17 kB)
Collecting uvicorn==0.17.5
Using cached uvicorn-0.17.5-py3-none-any.whl (53 kB)
Collecting timeloop==1.0.2
Using cached timeloop-1.0.2-py3-none-any.whl
Collecting filelock==3.4.2
Using cached filelock-3.4.2-py3-none-any.whl (9.9 kB)
Collecting python-multipart==0.0.5
Using cached python_multipart-0.0.5-py3-none-any.whl
Requirement already satisfied: numpy>=1.21.5 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from monailabel>=0.4*) (1.22.1)
Collecting pydantic==1.9.0
Using cached pydantic-1.9.0-cp39-cp39-win_amd64.whl (2.1 MB)
Collecting opencv-python-headless==4.5.5.64
Using cached opencv_python_headless-4.5.5.64-cp36-abi3-win_amd64.whl (35.3 MB)
Collecting einops>=0.3.2
Using cached einops-0.4.1-py3-none-any.whl (28 kB)
Collecting PyYAML==6.0
Using cached PyYAML-6.0-cp39-cp39-win_amd64.whl (151 kB)
Collecting monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]>=0.8.1
Using cached monai-0.8.1-202202162213-py3-none-any.whl (721 kB)
Collecting aiofiles==0.8.0
Using cached aiofiles-0.8.0-py3-none-any.whl (13 kB)
Collecting pydicom-seg==0.4.0
Using cached pydicom_seg-0.4.0-py3-none-any.whl (25 kB)
Collecting httpx==0.22.0
Using cached httpx-0.22.0-py3-none-any.whl (84 kB)
Collecting pynetdicom==2.0.1
Using cached pynetdicom-2.0.1-py3-none-any.whl (1.6 MB)
Collecting SimpleCRF==0.2.1.1
Using cached SimpleCRF-0.2.1.1.tar.gz (2.7 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: requests>=2.18 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from dicomweb-client==0.52.0->monailabel>=0.4*) (2.27.1)
Requirement already satisfied: retrying>=1.3.3 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from dicomweb-client==0.52.0->monailabel>=0.4*) (1.3.3)
Collecting starlette==0.17.1
Using cached starlette-0.17.1-py3-none-any.whl (58 kB)
Collecting rfc3986[idna2008]<2,>=1.3
Using cached rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)
Collecting sniffio
Using cached sniffio-1.2.0-py3-none-any.whl (10 kB)
Collecting httpcore<0.15.0,>=0.14.5
Using cached httpcore-0.14.7-py3-none-any.whl (68 kB)
Requirement already satisfied: certifi in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from httpx==0.22.0->monailabel>=0.4*) (2021.10.8)
Requirement already satisfied: charset-normalizer in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from httpx==0.22.0->monailabel>=0.4*) (2.0.12)
Requirement already satisfied: Pillow in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from openslide-python==1.1.2->monailabel>=0.4*) (9.0.1)
Collecting typing-extensions>=3.7.4.3
Using cached typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Requirement already satisfied: SimpleITK>1.2.4 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages\simpleitk-2.2.0rc2.post15-py3.9-win-amd64.egg (from pydicom-seg==0.4.0->monailabel>=0.4*) (2.2.0rc2.post15)
Collecting jsonschema<4.0.0,>=3.2.0
Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Requirement already satisfied: six>=1.4.0 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from python-multipart==0.0.5->monailabel>=0.4*) (1.16.0)
Collecting h11>=0.8
Using cached h11-0.13.0-py3-none-any.whl (58 kB)
Collecting click>=7.0
Using cached click-8.1.2-py3-none-any.whl (96 kB)
Collecting asgiref>=3.4.0
Using cached asgiref-3.5.0-py3-none-any.whl (22 kB)
Collecting anyio<4,>=3.0.0
Using cached anyio-3.5.0-py3-none-any.whl (79 kB)
Collecting torch>=1.6
Using cached torch-1.11.0-cp39-cp39-win_amd64.whl (157.9 MB)
Collecting psutil
Using cached psutil-5.9.0-cp39-cp39-win_amd64.whl (245 kB)
Collecting torchvision
Using cached torchvision-0.12.0-cp39-cp39-win_amd64.whl (1.0 MB)
Collecting scikit-image>=0.14.2
Using cached scikit_image-0.19.2-cp39-cp39-win_amd64.whl (12.6 MB)
Collecting itk>=5.2
Using cached itk-5.2.1.post1-cp39-cp39-win_amd64.whl (8.3 kB)
Collecting tqdm>=4.47.0
Using cached tqdm-4.63.1-py2.py3-none-any.whl (76 kB)
Collecting nibabel
Using cached nibabel-3.2.2-py3-none-any.whl (3.3 MB)
Collecting gdown>=3.6.4
Using cached gdown-4.4.0-py3-none-any.whl
Collecting tensorboard
Using cached tensorboard-2.8.0-py3-none-any.whl (5.8 MB)
Collecting pytorch-ignite==0.4.8
Using cached pytorch_ignite-0.4.8-py3-none-any.whl (251 kB)
Collecting lmdb
Using cached lmdb-1.3.0-cp39-cp39-win_amd64.whl (106 kB)
Collecting colorama
Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting h11>=0.8
Using cached h11-0.12.0-py3-none-any.whl (54 kB)
Requirement already satisfied: idna>=2.8 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from anyio<4,>=3.0.0->starlette==0.17.1->fastapi==0.73.0->monailabel>=0.4*) (3.3)
Collecting itk-core==5.2.1.post1
Using cached itk_core-5.2.1.post1-cp39-cp39-win_amd64.whl (33.7 MB)
Collecting itk-filtering==5.2.1.post1
Using cached itk_filtering-5.2.1.post1-cp39-cp39-win_amd64.whl (32.1 MB)
Collecting itk-io==5.2.1.post1
Using cached itk_io-5.2.1.post1-cp39-cp39-win_amd64.whl (5.8 MB)
Collecting itk-registration==5.2.1.post1
Using cached itk_registration-5.2.1.post1-cp39-cp39-win_amd64.whl (6.3 MB)
Collecting itk-numerics==5.2.1.post1
Using cached itk_numerics-5.2.1.post1-cp39-cp39-win_amd64.whl (18.8 MB)
Collecting itk-segmentation==5.2.1.post1
Using cached itk_segmentation-5.2.1.post1-cp39-cp39-win_amd64.whl (5.2 MB)
Requirement already satisfied: setuptools in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from jsonschema<4.0.0,>=3.2.0->pydicom-seg==0.4.0->monailabel>=0.4*) (60.9.3)
Collecting attrs>=17.4.0
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting pyrsistent>=0.14.0
Using cached pyrsistent-0.18.1-cp39-cp39-win_amd64.whl (61 kB)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from requests>=2.18->dicomweb-client==0.52.0->monailabel>=0.4*) (1.26.8)
Collecting PyWavelets>=1.1.1
Using cached PyWavelets-1.3.0-cp39-cp39-win_amd64.whl (4.2 MB)
Collecting networkx>=2.2
Using cached networkx-2.7.1-py3-none-any.whl (2.0 MB)
Requirement already satisfied: scipy>=1.4.1 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from scikit-image>=0.14.2->monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]>=0.8.1->monailabel>=0.4*) (1.8.0)
Collecting tifffile>=2019.7.26
Using cached tifffile-2022.3.25-py3-none-any.whl (179 kB)
Collecting imageio>=2.4.1
Using cached imageio-2.16.1-py3-none-any.whl (3.3 MB)
Requirement already satisfied: packaging>=20.0 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from scikit-image>=0.14.2->monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]>=0.8.1->monailabel>=0.4*) (21.3)
Collecting werkzeug>=0.11.15
Using cached Werkzeug-2.1.1-py3-none-any.whl (224 kB)
Requirement already satisfied: wheel>=0.26 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from tensorboard->monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]>=0.8.1->monailabel>=0.4*) (0.37.1)
Collecting grpcio>=1.24.3
Using cached grpcio-1.44.0-cp39-cp39-win_amd64.whl (3.4 MB)
Collecting google-auth-oauthlib<0.5,>=0.4.1
Using cached google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting absl-py>=0.4
Using cached absl_py-1.0.0-py3-none-any.whl (126 kB)
Collecting google-auth<3,>=1.6.3
Using cached google_auth-2.6.2-py2.py3-none-any.whl (156 kB)
Collecting tensorboard-data-server<0.7.0,>=0.6.0
Using cached tensorboard_data_server-0.6.1-py3-none-any.whl (2.4 kB)
Collecting tensorboard-plugin-wit>=1.6.0
Using cached tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
Collecting protobuf>=3.6.0
Using cached protobuf-3.20.0-cp39-cp39-win_amd64.whl (904 kB)
Collecting markdown>=2.6.8
Using cached Markdown-3.3.6-py3-none-any.whl (97 kB)
Collecting cachetools<6.0,>=2.0.0
Using cached cachetools-5.0.0-py3-none-any.whl (9.1 kB)
Collecting pyasn1-modules>=0.2.1
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting rsa<5,>=3.1.4
Using cached rsa-4.8-py3-none-any.whl (39 kB)
Collecting requests-oauthlib>=0.7.0
Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting importlib-metadata>=4.4
Using cached importlib_metadata-4.11.3-py3-none-any.whl (18 kB)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\jamesbutler\appdata\local\na-mic\slicer 4.13.0-2022-03-31\lib\python\lib\site-packages (from packaging>=20.0->scikit-image>=0.14.2->monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]>=0.8.1->monailabel>=0.4*) (3.0.7)
Collecting soupsieve>1.2
Using cached soupsieve-2.3.1-py3-none-any.whl (37 kB)
Collecting PySocks!=1.5.7,>=1.5.6
Using cached PySocks-1.7.1-py3-none-any.whl (16 kB)
Collecting zipp>=0.5
Using cached zipp-3.7.0-py3-none-any.whl (5.3 kB)
Collecting pyasn1<0.5.0,>=0.4.6
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting oauthlib>=3.0.0
Using cached oauthlib-3.2.0-py3-none-any.whl (151 kB)
Building wheels for collected packages: SimpleCRF
Building wheel for SimpleCRF (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for SimpleCRF (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
running bdist_wheel
running build
running build_ext
building 'maxflow' extension
creating build
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\dependency
creating build\temp.win-amd64-3.9\Release\dependency\maxflow-v3.0
creating build\temp.win-amd64-3.9\Release\maxflow_python
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I./dependency -I./maxflow_python "-IC:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-03-31\lib\Python\include" "-IC:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-03-31\lib\Python\Include" -IC:\Users\JamesButler\AppData\Local\Temp\pip-build-env-t24hibr2\overlay\Lib\site-packages\numpy\core\include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /EHsc /Tpdependency/maxflow-v3.0/graph.cpp /Fobuild\temp.win-amd64-3.9\Release\dependency/maxflow-v3.0/graph.obj
graph.cpp
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I./dependency -I./maxflow_python "-IC:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-03-31\lib\Python\include" "-IC:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-03-31\lib\Python\Include" -IC:\Users\JamesButler\AppData\Local\Temp\pip-build-env-t24hibr2\overlay\Lib\site-packages\numpy\core\include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /EHsc /Tpdependency/maxflow-v3.0/maxflow.cpp /Fobuild\temp.win-amd64-3.9\Release\dependency/maxflow-v3.0/maxflow.obj
maxflow.cpp
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I./dependency -I./maxflow_python "-IC:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-03-31\lib\Python\include" "-IC:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-03-31\lib\Python\Include" -IC:\Users\JamesButler\AppData\Local\Temp\pip-build-env-t24hibr2\overlay\Lib\site-packages\numpy\core\include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /EHsc /Tpmaxflow_python/maxflow.cpp /Fobuild\temp.win-amd64-3.9\Release\maxflow_python/maxflow.obj
maxflow.cpp
maxflow_python/maxflow.cpp(1): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for SimpleCRF
Failed to build SimpleCRF
ERROR: Could not build wheels for SimpleCRF, which is required to install pyproject.toml-based projects
WARNING: You are using pip version 22.0.3; however, version 22.0.4 is available.
You should consider upgrading via the 'C:\Users\JamesButler\AppData\Local\NA-MIC\Slicer 4.13.0-2022-03-31\bin\python-real.exe -m pip install --upgrade pip' command.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:14 (6 by maintainers)
Top GitHub Comments
https://pypi.org/project/monailabel/0.4.0rc2/ is available and docker instance is updated
Now with https://github.com/Project-MONAI/MONAILabel/commit/d1f4b546553e8ffd1336ae70099f9d353fac523c, doing the following on Windows I can confirm
monailabel
is successful. It might be helpful though to cut a new release candidate now that some dependencies have changed.