github上clone任何仓库都得创建虚拟环境我这台电脑的显卡是4070 ti super, 一般python3.9(首选) 或者3.101.nvidia-smi 查看自己的电脑能支持的最大CUDA Version 。我是13.1,一般下11.8就可以。C:\Users\shinenvidia-smi Thu Apr 30 13:39:20 2026 ----------------------------------------------------------------------------------------- | NVIDIA-SMI 591.86 Driver Version: 591.86 CUDA Version: 13.1 | --------------------------------------------------------------------------------------- | GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | || | 0 NVIDIA GeForce RTX 4070 ... WDDM | 00000000:01:00.0 On | N/A | | 0% 43C P8 9W / 285W | 729MiB / 16376MiB | 5% Default | | | | N/A | --------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | || | 0 N/A N/A 3008 CG ...yb3d8bbwe\WindowsTerminal.exe N/A | | 0 N/A N/A 4436 CG ...crosoft\OneDrive\OneDrive.exe N/A | | 0 N/A N/A 6032 CG ...5n1h2txyewy\TextInputHost.exe N/A | | 0 N/A N/A 7460 CG ...em32\ApplicationFrameHost.exe N/A | | 0 N/A N/A 8040 CG ...y\StartMenuExperienceHost.exe N/A | | 0 N/A N/A 12408 CG ....0.3912.86\msedgewebview2.exe N/A | | 0 N/A N/A 18624 CG ...64__8wekyb3d8bbwe\GameBar.exe N/A | | 0 N/A N/A 21464 CG ...ntrolPanel\SystemSettings.exe N/A | | 0 N/A N/A 23668 CG ...8wekyb3d8bbwe\M365Copilot.exe N/A | | 0 N/A N/A 24100 CG ..._cw5n1h2txyewy\SearchHost.exe N/A | | 0 N/A N/A 24172 CG ....0.3912.86\msedgewebview2.exe N/A | | 0 N/A N/A 25196 CG C:\Windows\explorer.exe N/A | | 0 N/A N/A 25732 CG ...indows\System32\ShellHost.exe N/A | | 0 N/A N/A 26284 CG ...2txyewy\CrossDeviceResume.exe N/A | | 0 N/A N/A 26344 CG ...xyewy\ShellExperienceHost.exe N/A | | 0 N/A N/A 26812 CG ....0.3912.86\msedgewebview2.exe N/A | | 0 N/A N/A 27444 CG ...t\Edge\Application\msedge.exe N/A | -----------------------------------------------------------------------------------------torch-2.0.1cu118-cp39-cp39-win_amd64.whlC:\Users\shineconda create -n depth_anything_v2 python3.9 -yC:\Users\shineconda activate depth_anything_v2切换到项目目录下(depth_anything_v2) PS E:\Projects\Depth-Anything-V2-main pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118核心的两个包Downloading https://download-r2.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp39-cp39-win_amd64.whl (2817.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 GB 6.1 MB/s 0:06:14 Downloading https://download-r2.pytorch.org/whl/cu118/torchvision-0.22.1%2Bcu118-cp39-cp39-win_amd64.whl (5.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.5/5.5 MB 7.1 MB/s 0:00:00自己可以先下好电脑和u盘存一份。python版本和torch torchvision版本比较固定需要时拷过去再建新环境很快。前提是你确定nvidia CUDA版本11.8。python版本和torch torchvision版本不变。https://download-r2.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp39-cp39-win_amd64.whlhttps://download-r2.pytorch.org/whl/cu118/torchvision-0.22.1%2Bcu118-cp39-cp39-win_amd64.whl