MIC-DKFZ / nnDetection

nnDetection is a self-configuring framework for 3D (volumetric) medical object detection which can be applied to new data sets without manual intervention. It includes guides for 12 data sets that were used to develop and evaluate the performance of the proposed method.
Apache License 2.0
542 stars 94 forks source link

[Question] An error occurred during installing nnUnet #260

Closed XiaoXKKK closed 2 months ago

XiaoXKKK commented 3 months ago

:question: 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

partha-ghosh commented 2 months ago

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 .
XiaoXKKK commented 2 months ago

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