windows7 64位机上安装配置CUDA7.5(或8.0)+cudnn5.0操作步骤

本文详细介绍如何在Windows7上安装CUDA7.5及其验证步骤,包括必要的系统要求、驱动安装、验证安装正确性的方法及解决过程中遇到的问题。

按照官网文档 http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#axzz4TpI4c8vf 进行安装:

在windows7上安装cuda8.0/cuda7.5的系统需求:(1)、ACUDA-capable GPU(本机显卡为GeForce GT 640M);(2)、A supported version of Microsoft Windows(Windows7 64位);(3)、A supportedversion of Microsoft Visual Studio(已安装VS2013);(4)、the NVIDIACUDA Toolkit。

安装cuda8.0:

1.      下载cuda8.0和cudnn5.0:

(1)、从https://developer.nvidia.com/cuda-downloads 下载cuda_8.0.44_windows.exe

(2)、从https://developer.nvidia.com/rdp/cudnn-download下载cudnn-8.0-windows7-x64-v5.0-ga.zip;

2.      安装显卡驱动:从http://www.geforce.cn/drivers下载匹配的驱动,默认本机已安装;

3.      安装cuda8.0:双击cuda_8.0.44_windows.exe直接进行安装即可,默认安装到C:\ProgramFiles\NVIDIA GPU Computing Toolkit目录下;

4.      验证cuda8.0已正确安装:

(1)、打开cmd,输入$ nvcc  -V,结果如下图:


(2)、编译cuda8.0自带的samples:在C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0目录下,用vs2013,打开Samples_vs2013.sln,在Release下,选中解决方案Samples_vs2013,重新生成解决方案,第一次编译会提示找不到”d3dx9.h”、”d3dx10.h”、”d3dx11.h”头文件,可从https://www.microsoft.com/en-us/download/details.aspx?id=6812  下载DXSDK_Jun10.exe,按照默认安装即可;然后重新打开Samples_vs2013,再编译即可,结果如下图:


(3)、执行C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\bin\win64\Release目录下的deviceQuery.exe和bandwidthTest.exe:

第一次执行结果如下图,直接死机,强制关机,在网上查找原因说有可能是由于驱动导致:


接着恢复原始驱动,执行结果如下,驱动版本低导致:


后又从官方分别下载了几个版本的驱动,依然不行,最后又试着用驱动精灵装驱动,还是不行,有可能GeForce GT 640M不支持cuda8.0.先搁置cuda8.0,接着试着安装cuda7.5,看是否正常。

 

安装cuda7.5:

1.      下载cuda7.5(cuda_7.5.18_windows.exe)和cudnn5.0(cudnn-7.5-windows7-x64-v5.0-ga.zip):注意,cuda8.0对应的cudnn5.0和cuda7.5对应的cudnn5.0是不一样的;

2.      安装cuda7.5:双击cuda_7.5.18_windows.exe直接进行安装即可,默认安装到C:\ProgramFiles\NVIDIA GPU Computing Toolkit目录下;

3.      验证cuda7.5已正确安装:

(1)、打开cmd,输入$ nvcc  -V,结果如下图:


(2)、编译cuda7.5自带的samples:在C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5目录下,用vs2013,打开Samples_vs2013.sln,在Release下,选中解决方案Samples_vs2013,重新生成解决方案,结果如下图:


(3)、执行C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\bin\win64\Release目录下的deviceQuery.exe和bandwidthTest.exe,结果如下,一切正常:



4.      安装cudnn5.0:

(1)、解压缩:会生成cuda/include、cuda/lib、cuda/bin三个目录;

(2)、分别将cuda/include、cuda/lib、cuda/bin三个目录中的内容拷贝到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5对应的include、lib、bin目录下即可。

cuda7.5和cudnn5.0就可以在机子上正常使用了。

PowerShell 7 环境已加载 (版本: 7.5.2) PS C:\Users\Administrator\Desktop> cd E:\PyTorch_Build\pytorch PS E:\PyTorch_Build\pytorch> .\pytorch_env\Scripts\activate (pytorch_env) PS E:\PyTorch_Build\pytorch> # 移除可能导致冲突的镜像源 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --remove-key channels (pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --remove-key default_channels CondaKeyError: 'default_channels': undefined in config (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 设置官方通道优先级 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --add channels pytorch-nightly C:\Miniconda3\Lib\site-packages\conda\base\context.py:211: FutureWarning: Adding 'defaults' to channel list implicitly is deprecated and will be removed in 25.9. To remove this warning, please choose a default channel explicitly with conda's regular configuration system, e.g. by adding 'defaults' to the list of channels: conda config --add channels defaults For more information see https://docs.conda.io/projects/conda/en/stable/user-guide/configuration/use-condarc.html deprecated.topic( (pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --add channels nvidia (pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --add channels conda-forge (pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --add channels defaults Warning: 'defaults' already in 'channels' list, moving to the top (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 设置通道优先级为 strict(避免混合来源包) (pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --set channel_priority strict (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 验证配置 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --show channels channels: - defaults - conda-forge - nvidia - pytorch-nightly (pytorch_env) PS E:\PyTorch_Build\pytorch> conda config --show channel_priority channel_priority: strict (pytorch_env) PS E:\PyTorch_Build\pytorch> # 1. 安装基础依赖 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda install -y python=3.10 cudatoolkit=12.1 cudnn numpy ninja 3 channel Terms of Service accepted Channels: - defaults - conda-forge - nvidia - pytorch-nightly Platform: win-64 Collecting package metadata (repodata.json): done Solving environment: failed LibMambaUnsatisfiableError: Encountered problems while solving: - unsupported request - package mkl-service-2.5.2-py313haca3b5c_0 requires python_abi 3.13.* *_cp313, but none of the providers can be instd Could not solve for environment specs The following packages are incompatible ├─ cudatoolkit =12.1 * does not exist (perhaps a typo or a missing channel); ├─ mkl-service =* * is installable with the potential options │ ├─ mkl-service 2.5.2 would require │ │ └─ python_abi =3.13 *_cp313 with the potential options │ │ ├─ python_abi 3.13 would require │ │ │ └─ python =3.13 *_cp313, which can be installed; │ │ └─ python_abi 3.13 conflicts with any installable versions previously reported; │ ├─ mkl-service 1.1.2 would require │ │ └─ mkl >=2019.1,<2021.0a0 *, which can be installed; │ ├─ mkl-service 1.1.2 would require │ │ └─ mkl >=2018.0.0,<2019.0a0 *, which can be installed; │ ├─ mkl-service 1.1.2 would require │ │ └─ mkl >=2018.0.3,<2019.0a0 *, which can be installed; │ ├─ mkl-service 2.0.2 would require │ │ └─ mkl >=2019.3,<2021.0a0 *, which can be installed; │ ├─ mkl-service 2.3.0 would require │ │ └─ mkl >=2019.4,<2021.0a0 *, which can be installed; │ ├─ mkl-service [2.3.0|2.4.0] would require │ │ └─ mkl >=2021.2.0,<2022.0a0 *, which can be installed; │ ├─ mkl-service 2.4.0 would require │ │ └─ mkl >=2021.4.0,<2022.0a0 *, which can be installed; │ ├─ mkl-service 2.4.0 would require │ │ └─ mkl >=2023.1.0,<2024.0a0 *, which can be installed; │ ├─ mkl-service 2.4.0 would require │ │ └─ mkl >=2025.0.0,<2026.0a0 *, which can be installed; │ └─ mkl-service [2.0.1|2.0.2|...|2.5.2] conflicts with any installable versions previously reported; ├─ mkl ==2024.2.2 * is not installable because it conflicts with any installable versions previously reported; └─ python =3.10 * is not installable because it conflicts with any installable versions previously reported. (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 2. 单独安装 PyTorch (pytorch_env) PS E:\PyTorch_Build\pytorch> conda install -y pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch-nightly -c nvidia 3 channel Terms of Service accepted Channels: - pytorch-nightly - nvidia - defaults - conda-forge Platform: win-64 Collecting package metadata (repodata.json): done Solving environment: failed LibMambaUnsatisfiableError: Encountered problems while solving: - package torchvision-0.20.0.dev20241112-py310_cu124 requires python >=3.10,<3.11.0a0, but none of the providers can d - package pytorch-2.5.0.dev20240618-py3.11_cuda12.4_cudnn8_0 requires mkl 2021.4.*, but none of the providers can be d - nothing provides pytorch 2.1.0.dev20230523 needed by torchaudio-2.1.0.dev20230523-py311_cu117 Could not solve for environment specs The following packages are incompatible ├─ libuv =1.44 * is requested and can be installed; ├─ mkl ==2024.2.2 * is requested and can be installed; ├─ pin on python 3.13.* =* * is installable and it requires │ └─ python =3.13 *, which can be installed; ├─ pytorch =* * is not installable because there are no viable options │ ├─ pytorch [2.5.0.dev20240618|2.5.0.dev20240619] would require │ │ └─ mkl =2021.4 *, which conflicts with any installable versions previously reported; │ ├─ pytorch [2.5.0.dev20240618|2.5.0.dev20240619|2.5.0.dev20240730|2.5.0.dev20240731|2.6.0.dev20241111] would require │ │ └─ mkl =2023.1 *, which conflicts with any installable versions previously reported; │ ├─ pytorch 2.6.0.dev20241112 would require │ │ ├─ libuv >=1.48.0,<2.0a0 *, which conflicts with any installable versions previously reported; │ │ └─ mkl =2023.1 *, which conflicts with any installable versions previously reported; │ └─ pytorch [1.0.1|1.10.2|...|2.7.1] conflicts with any installable versions previously reported; ├─ torchaudio =* * is not installable because there are no viable options │ ├─ torchaudio 2.1.0.dev20230523 would require │ │ └─ pytorch ==2.1.0.0dev20230523 *, which does not exist (perhaps a missing channel); │ ├─ torchaudio 2.4.0.dev20240729 would require │ │ └─ pytorch ==2.5.0.0dev20240726 *, which does not exist (perhaps a missing channel); │ ├─ torchaudio 2.4.0.dev20240729 would require │ │ └─ pytorch ==2.5.0.0dev20240729 *, which does not exist (perhaps a missing channel); │ ├─ torchaudio 2.4.0.dev20240729 would require │ │ └─ pytorch ==2.5.0.0dev20240728 *, which does not exist (perhaps a missing channel); │ ├─ torchaudio [2.5.0.dev20241112|2.5.0.dev20241113|...|2.5.0.dev20241118] would require │ │ └─ pytorch ==2.6.0.0dev20241112 *, which cannot be installed (as previously explained); │ └─ torchaudio 2.5.1 conflicts with any installable versions previously reported; └─ torchvision =* * is not installable because there are no viable options ├─ torchvision [0.20.0.dev20241112|0.20.0.dev20241113|...|0.20.0.dev20241118] would require │ └─ python >=3.9,<3.10.0a0 *, which conflicts with any installable versions previously reported; ├─ torchvision [0.20.0.dev20241112|0.20.0.dev20241113|...|0.20.0.dev20241118] would require │ └─ python >=3.10,<3.11.0a0 *, which conflicts with any installable versions previously reported; ├─ torchvision [0.20.0.dev20241112|0.20.0.dev20241113|...|0.20.0.dev20241118] would require │ └─ python >=3.11,<3.12.0a0 *, which conflicts with any installable versions previously reported; ├─ torchvision [0.20.0.dev20241112|0.20.0.dev20241113|...|0.20.0.dev20241118] would require │ └─ python >=3.12,<3.13.0a0 *, which conflicts with any installable versions previously reported; └─ torchvision [0.11.3|0.13.1|...|0.22.0] conflicts with any installable versions previously reported. Pins seem to be involved in the conflict. Currently pinned specs: - python=3.13 (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 3. 安装补充依赖 (pytorch_env) PS E:\PyTorch_Build\pytorch> conda install -y pyyaml mkl mkl-include setuptools cmake cffi typing_extensions 3 channel Terms of Service accepted Channels: - defaults - conda-forge - nvidia - pytorch-nightly Platform: win-64 Collecting package metadata (repodata.json): done Solving environment: done ## Package Plan ## environment location: C:\Miniconda3 added / updated specs: - cffi - cmake - mkl - mkl-include - pyyaml - setuptools - typing_extensions The following packages will be downloaded: package | build ---------------------------|----------------- cmake-3.26.4 | h693b641_0 12.0 MB defaults pyyaml-6.0.2 | py313h827c3e9_0 198 KB defaults yaml-0.2.5 | he774522_0 62 KB defaults ------------------------------------------------------------ Total: 12.2 MB The following NEW packages will be INSTALLED: cmake pkgs/main/win-64::cmake-3.26.4-h693b641_0 pyyaml pkgs/main/win-64::pyyaml-6.0.2-py313h827c3e9_0 yaml pkgs/main/win-64::yaml-0.2.5-he774522_0 Downloading and Extracting Packages: Preparing transaction: done Verifying transaction: done Executing transaction: done (pytorch_env) PS E:\PyTorch_Build\pytorch> python cuda_test.py ================================================== PyTorch 版本: 2.6.0.dev20241112+cu121 CUDA 可用: True CUDA 版本: 12.1 cuDNN 版本: 90100 E:\PyTorch_Build\pytorch\pytorch_env\lib\site-packages\torch\cuda\__init__.py:235: UserWarning: NVIDIA GeForce RTX 5070 with CUDA capability sm_120 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90. If you want to use the NVIDIA GeForce RTX 5070 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/ warnings.warn( GPU 型号: NVIDIA GeForce RTX 5070 计算能力: (12, 0) Traceback (most recent call last): File "E:\PyTorch_Build\pytorch\cuda_test.py", line 25, in <module> check_cuda() File "E:\PyTorch_Build\pytorch\cuda_test.py", line 16, in check_cuda a = torch.randn(1000, 1000, device='cuda') RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions. (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 创建新的虚拟环境 (pytorch_env) PS E:\PyTorch_Build\pytorch> python -m venv cuda_env (pytorch_env) PS E:\PyTorch_Build\pytorch> .\cuda_env\Scripts\activate (cuda_env) PS E:\PyTorch_Build\pytorch> (cuda_env) PS E:\PyTorch_Build\pytorch> # 安装基础依赖 (cuda_env) PS E:\PyTorch_Build\pytorch> pip install numpy==1.26.4 ninja pyyaml mkl mkl-include setuptools cmake Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting numpy==1.26.4 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/19/77/538f202862b9183f54108557bfda67e17603fc560c384559e769321c9d92/numpy-1.26.4-cp310-cp310-win_amd64.whl (15.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 34.6 MB/s eta 0:00:00 Collecting ninja Using cached https://pypi.tuna.tsinghua.edu.cn/packages/29/45/c0adfbfb0b5895aa18cec400c535b4f7ff3e52536e0403602fc1a23f7de9/ninja-1.13.0-py3-none-win_amd64.whl (309 kB) Collecting pyyaml Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b5/84/0fa4b06f6d6c958d207620fc60005e241ecedceee58931bb20138e1e5776/PyYAML-6.0.2-cp310-cp310-win_amd64.whl (161 kB) Collecting mkl Downloading https://pypi.tuna.tsinghua.edu.cn/packages/91/ae/025174ee141432b974f97ecd2aea529a3bdb547392bde3dd55ce48fe7827/mkl-2025.2.0-py2.py3-none-win_amd64.whl (153.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 153.6/153.6 MB 24.2 MB/s eta 0:00:00 Collecting mkl-include Downloading https://pypi.tuna.tsinghua.edu.cn/packages/06/87/3eee37bf95c6b820b6394ad98e50132798514ecda1b2584c71c2c96b973c/mkl_include-2025.2.0-py2.py3-none-win_amd64.whl (1.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 87.9 MB/s eta 0:00:00 Requirement already satisfied: setuptools in e:\pytorch_build\pytorch\cuda_env\lib\site-packages (65.5.0) Collecting cmake Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7c/d0/73cae88d8c25973f2465d5a4457264f95617c16ad321824ed4c243734511/cmake-4.1.0-py3-none-win_amd64.whl (37.6 MB) Collecting tbb==2022.* Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4e/d2/01e2a93f9c644585088188840bf453f23ed1a2838ec51d5ba1ada1ebca71/tbb-2022.2.0-py3-none-win_amd64.whl (420 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 420.6/420.6 kB ? eta 0:00:00 Collecting intel-openmp<2026,>=2024 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/89/ed/13fed53fcc7ea17ff84095e89e63418df91d4eeefdc74454243d529bf5a3/intel_openmp-2025.2.1-py2.py3-none-win_amd64.whl (34.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.0/34.0 MB 43.5 MB/s eta 0:00:00 Collecting tcmlib==1.* Downloading https://pypi.tuna.tsinghua.edu.cn/packages/91/7b/e30c461a27b97e0090e4db822eeb1d37b310863241f8c3ee56f68df3e76e/tcmlib-1.4.0-py2.py3-none-win_amd64.whl (370 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 370.3/370.3 kB ? eta 0:00:00 Collecting intel-cmplr-lib-ur==2025.2.1 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a8/70/938e81f58886fd4e114d5a5480d98c1396e73e40b7650f566ad0c4395311/intel_cmplr_lib_ur-2025.2.1-py2.py3-none-win_amd64.whl (1.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 72.4 MB/s eta 0:00:00 Collecting umf==0.11.* Downloading https://pypi.tuna.tsinghua.edu.cn/packages/33/a0/c8d755f08f50ddd99cb4a29a7e950ced7a0903cb72253e57059063609103/umf-0.11.0-py2.py3-none-win_amd64.whl (231 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 231.7/231.7 kB ? eta 0:00:00 Installing collected packages: tcmlib, mkl-include, umf, tbb, pyyaml, numpy, ninja, cmake, intel-cmplr-lib-ur, intel-openmp, mkl Successfully installed cmake-4.1.0 intel-cmplr-lib-ur-2025.2.1 intel-openmp-2025.2.1 mkl-2025.2.0 mkl-include-2025.2.0 ninja-1.13.0 numpy-1.26.4 pyyaml-6.0.2 tbb-2022.2.0 tcmlib-1.4.0 umf-0.11.0 [notice] A new release of pip available: 22.3.1 -> 25.2 [notice] To update, run: python.exe -m pip install --upgrade pip (cuda_env) PS E:\PyTorch_Build\pytorch> (cuda_env) PS E:\PyTorch_Build\pytorch> # 安装 PyTorch Nightly (cuda_env) PS E:\PyTorch_Build\pytorch> pip install --pre torch torchvision torchaudio ` >> --index-url https://download.pytorch.org/whl/nightly/cu121 ` >> --no-deps Looking in indexes: https://download.pytorch.org/whl/nightly/cu121 Collecting torch Using cached https://download.pytorch.org/whl/nightly/cu121/torch-2.6.0.dev20241112%2Bcu121-cp310-cp310-win_amd64.whl (2456.2 MB) Collecting torchvision Using cached https://download.pytorch.org/whl/nightly/cu121/torchvision-0.20.0.dev20241112%2Bcu121-cp310-cp310-win_amd64.whl (6.2 MB) Collecting torchaudio Using cached https://download.pytorch.org/whl/nightly/cu121/torchaudio-2.5.0.dev20241112%2Bcu121-cp310-cp310-win_amd64.whl (4.2 MB) Installing collected packages: torchaudio, torchvision, torch Successfully installed torch-2.6.0.dev20241112+cu121 torchaudio-2.5.0.dev20241112+cu121 torchvision-0.20.0.dev20241112+cu121 [notice] A new release of pip available: 22.3.1 -> 25.2 [notice] To update, run: python.exe -m pip install --upgrade pip (cuda_env) PS E:\PyTorch_Build\pytorch> (cuda_env) PS E:\PyTorch_Build\pytorch> # 安装补充依赖 (cuda_env) PS E:\PyTorch_Build\pytorch> pip install typing_extensions future six requests dataclasses Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting typing_extensions Using cached https://pypi.tuna.tsinghua.edu.cn/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl (44 kB) Collecting future Downloading https://pypi.tuna.tsinghua.edu.cn/packages/da/71/ae30dadffc90b9006d77af76b393cb9dfbfc9629f339fc1574a1c52e6806/future-1.0.0-py3-none-any.whl (491 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 491.3/491.3 kB 1.5 MB/s eta 0:00:00 Collecting six Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl (11 kB) Collecting requests Using cached https://pypi.tuna.tsinghua.edu.cn/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl (64 kB) Collecting dataclasses Downloading https://pypi.tuna.tsinghua.edu.cn/packages/26/2f/1095cdc2868052dd1e64520f7c0d5c8c550ad297e944e641dbf1ffbb9a5d/dataclasses-0.6-py3-none-any.whl (14 kB) Collecting charset_normalizer<4,>=2 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e2/c6/f05db471f81af1fa01839d44ae2a8bfeec8d2a8b4590f16c4e7393afd323/charset_normalizer-3.4.3-cp310-cp310-win_amd64.whl (107 kB) Collecting idna<4,>=2.5 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl (70 kB) Collecting urllib3<3,>=1.21.1 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl (129 kB) Collecting certifi>=2017.4.17 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e5/48/1549795ba7742c948d2ad169c1c8cdbae65bc450d6cd753d124b17c8cd32/certifi-2025.8.3-py3-none-any.whl (161 kB) Installing collected packages: dataclasses, urllib3, typing_extensions, six, idna, future, charset_normalizer, certifi, requests ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. torch 2.6.0.dev20241112+cu121 requires filelock, which is not installed. torch 2.6.0.dev20241112+cu121 requires fsspec, which is not installed. torch 2.6.0.dev20241112+cu121 requires jinja2, which is not installed. torch 2.6.0.dev20241112+cu121 requires networkx, which is not installed. torch 2.6.0.dev20241112+cu121 requires sympy==1.13.1; python_version >= "3.9", which is not installed. Successfully installed certifi-2025.8.3 charset_normalizer-3.4.3 dataclasses-0.6 future-1.0.0 idna-3.10 requests-2.32.5 six-1.17.0 typing_extensions-4.15.0 urllib3-2.5.0 [notice] A new release of pip available: 22.3.1 -> 25.2 [notice] To update, run: python.exe -m pip install --upgrade pip (cuda_env) PS E:\PyTorch_Build\pytorch> (cuda_env) PS E:\PyTorch_Build\pytorch> # 运行验证脚本 (cuda_env) PS E:\PyTorch_Build\pytorch> python cuda_test.py ================================================== PyTorch 版本: 2.6.0.dev20241112+cu121 CUDA 可用: True CUDA 版本: 12.1 cuDNN 版本: 90100 E:\PyTorch_Build\pytorch\cuda_env\lib\site-packages\torch\cuda\__init__.py:235: UserWarning: NVIDIA GeForce RTX 5070 with CUDA capability sm_120 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90. If you want to use the NVIDIA GeForce RTX 5070 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/ warnings.warn( GPU 型号: NVIDIA GeForce RTX 5070 计算能力: (12, 0) Traceback (most recent call last): File "E:\PyTorch_Build\pytorch\cuda_test.py", line 25, in <module> check_cuda() File "E:\PyTorch_Build\pytorch\cuda_test.py", line 16, in check_cuda a = torch.randn(1000, 1000, device='cuda') RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions. (cuda_env) PS E:\PyTorch_Build\pytorch>
09-02
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值