Closed lucky-asia closed 2 months ago
try use "pip install --no-build-isolation -e ."
【使用TotalSegment 模块 在3D Slicer中分割人体所有器官和骨骼】 https://www.bilibili.com/video/BV1m1421m7f2/?share_source=copy_web&vd_source=0e576be21554bb1ea5d13280e520d904
【3D Slicer TotalSegmentor 如何本地加载预训练权重】 https://www.bilibili.com/video/BV1aF4m1T73r/?share_source=copy_web&vd_source=0e576be21554bb1ea5d13280e520d904
this two videos will help you
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Obtaining file:///D:/Project/MedSAMSlicer-SAM2 Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [32 lines of output] C:\Users\23232\AppData\Local\Temp\pip-build-env-xvzyh0vo\overlay\Lib\site-packages\torch_subclasses\functional_tensor.py:258: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_nump y.cpp:84.) cpu = _conversion_method_template(device=torch.device("cpu")) Traceback (most recent call last): File "C:\Users\23232.conda\envs\sam2\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\23232.conda\envs\sam2\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\23232.conda\envs\sam2\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 132, in get_requires_for_build_editable
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\23232\AppData\Local\Temp\pip-build-env-xvzyh0vo\overlay\Lib\site-packages\setuptools\build_meta.py", line 464, in get_requires_for_build_editable
return self.get_requires_for_build_wheel(config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\23232\AppData\Local\Temp\pip-build-env-xvzyh0vo\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\23232\AppData\Local\Temp\pip-build-env-xvzyh0vo\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
self.run_setup()
File "C:\Users\23232\AppData\Local\Temp\pip-build-env-xvzyh0vo\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
exec(code, locals())
File "", line 75, in
File "", line 56, in get_extensions
File "C:\Users\23232\AppData\Local\Temp\pip-build-env-xvzyh0vo\overlay\Lib\site-packages\torch\utils\cpp_extension.py", line 1076, in CUDAExtension
library_dirs += library_paths(cuda=True)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\23232\AppData\Local\Temp\pip-build-env-xvzyh0vo\overlay\Lib\site-packages\torch\utils\cpp_extension.py", line 1214, in library_paths
paths.append(_join_cuda_home(lib_dir))
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\23232\AppData\Local\Temp\pip-build-env-xvzyh0vo\overlay\Lib\site-packages\torch\utils\cpp_extension.py", line 2416, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.