MIC-DKFZ/nnDetection

[Question] An error occurred during installing nnUnet

XiaoXKKK opened this issue · 2 comments

❓ Question

Logs:

......
copying build\lib\nnunet\experiment_planning\alternative_experiment_planning\target_spacing\experiment_planner_baseline_3DUNet_targetSpacingForAnisoAxis.py -> build\bdist.win-amd64\wheel\.\nnunet\experiment_planning\alternative_experiment_planning\target_spacing
  error: could not create 'build\bdist.win-amd64\wheel\.\nnunet\experiment_planning\alternative_experiment_planning\target_spacing\experiment_planner_baseline_3DUNet_targetSpacingForAnisoAxis.py': No such file or directory
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for nnUnet
  Running setup.py clean for nnUnet
Failed to build nnUnet
ERROR: Could not build wheels for nnUnet, which is required to install pyproject.toml-based projects

Python Version: 3.9.10
Torch Version: 2.3.1+cu118
Torch Vision Version: 0.18.1+cu118

To create a working environment with conda, please run:

conda create --name nndet_venv python=3.8
conda activate nndet_venv

and then please run the following commands to set it up:

git clone https://github.com/MIC-DKFZ/nnDetection.git
cd nnDetection

export CXX=$CONDA_PREFIX/bin/x86_64-conda_cos6-linux-gnu-c++
export CC=$CONDA_PREFIX/bin/x86_64-conda_cos6-linux-gnu-c++

conda install gxx_linux-64==9.3.0
conda install cuda -c nvidia/label/cuda-11.3.1
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch

pip install -r requirements.txt  \
  && pip install hydra-core --upgrade --pre \
  && pip install git+https://github.com/mibaumgartner/pytorch_model_summary.git
FORCE_CUDA=1 pip install -v -e .

Thank you for your help, I've solved it.