从 WASCE v2.0 Server Adapter 2.0.0 迁移到 WASCE v2.0 Server Adapter 2.1.1

本文介绍如何将Eclpse中使用WASCEv2.0 ServerAdapter 2.0.0开发的项目迁移到2.1.1版本。主要涉及修改facet设置和geronimo部署描述符的格式调整。
Eclpse中,WASCE v2.0的Server Adapter插件目前有两个版本:2.0.0和2.1.1。当把在2.0.0下开发的项目迁移到2.1.1时,需要做一下工作:
1.修改facet
修改项目.settings目录中org.eclipse.wst.common.project.facet.core文件,将其中的
<installed facet="org.apache.geronimo.facet" version="1.1"/>
改为
<installed facet="com.ibm.wasce.facet" version="1.2"/>


2.修改geronimo部署描述符
geronimo1.1的描述符实例如下:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1" application-name="TestApplication">
  <sys:environment>
    <sys:moduleId>
      <sys:groupId>default</sys:groupId>
      <sys:artifactId>TestApplication</sys:artifactId>
      <sys:version>1.0</sys:version>
      <sys:type>car</sys:type>
    </sys:moduleId>
  </sys:environment>
</application>
将其改为1.2的描述符格式,如下:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app:application xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" xmlns:pers="http://java.sun.com/xml/ns/persistence" xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0" application-name="TestApplication">
    <dep:environment>
        <dep:moduleId>
            <dep:groupId>default</dep:groupId>
            <dep:artifactId>TestApplication</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>car</dep:type>
        </dep:moduleId>
    </dep:environment>
</app:application>

*注意ear项目及其子项目都要做此修改。

3.将应用发布到服务器
(rtx5070_env) PS E:\PyTorch_Build\pytorch> # 验证环境变量 (rtx5070_env) PS E:\PyTorch_Build\pytorch> $env:VIRTUAL_ENV D:\New_Location\rtx5070_env (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 使用Python内部验证 (rtx5070_env) PS E:\PyTorch_Build\pytorch> python -c "import sys; print(sys.prefix)" D:\New_Location\rtx5070_env (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 验证site-packages路径 (rtx5070_env) PS E:\PyTorch_Build\pytorch> python -c "import site; print('\n'.join(site.getsitepackages()))" D:\New_Location\rtx5070_env D:\New_Location\rtx5070_env\lib\site-packages (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 纯净度检查 (rtx5070_env) PS E:\PyTorch_Build\pytorch> pip list --format=columns --isolated Package Version ------------------ -------- attrs 25.3.0 build 1.3.0 certifi 2025.8.3 charset-normalizer 3.4.3 cmake 4.1.0 colorama 0.4.6 exceptiongroup 1.3.0 expecttest 0.3.0 filelock 3.19.1 fsspec 2025.9.0 hypothesis 6.138.14 idna 3.10 Jinja2 3.1.6 lintrunner 0.12.7 MarkupSafe 3.0.2 mpmath 1.3.0 networkx 3.4.2 ninja 1.13.0 numpy 2.2.6 optree 0.17.0 packaging 25.0 pip 22.3.1 psutil 7.0.0 pyproject_hooks 1.2.0 PyYAML 6.0.2 requests 2.32.5 setuptools 79.0.1 six 1.17.0 sortedcontainers 2.4.0 sympy 1.14.0 tomli 2.2.1 typing_extensions 4.15.0 urllib3 2.5.0 uv 0.8.15 wheel 0.45.1 [notice] A new release of pip available: 22.3.1 -> 25.2 [notice] To update, run: python.exe -m pip install --upgrade pip (rtx5070_env) PS E:\PyTorch_Build\pytorch> pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 --isolated Looking in indexes: https://download.pytorch.org/whl/cu121 Collecting torch Using cached https://download.pytorch.org/whl/cu121/torch-2.5.1%2Bcu121-cp310-cp310-win_amd64.whl (2449.4 MB) Collecting torchvision Using cached https://download.pytorch.org/whl/cu121/torchvision-0.20.1%2Bcu121-cp310-cp310-win_amd64.whl (6.1 MB) Collecting torchaudio Using cached https://download.pytorch.org/whl/cu121/torchaudio-2.5.1%2Bcu121-cp310-cp310-win_amd64.whl (4.1 MB) Requirement already satisfied: jinja2 in d:\new_location\rtx5070_env\lib\site-packages (from torch) (3.1.6) Requirement already satisfied: fsspec in d:\new_location\rtx5070_env\lib\site-packages (from torch) (2025.9.0) Requirement already satisfied: typing-extensions>=4.8.0 in d:\new_location\rtx5070_env\lib\site-packages (from torch) (4.15.0) Requirement already satisfied: networkx in d:\new_location\rtx5070_env\lib\site-packages (from torch) (3.4.2) Collecting sympy==1.13.1 Using cached https://download.pytorch.org/whl/sympy-1.13.1-py3-none-any.whl (6.2 MB) Requirement already satisfied: filelock in d:\new_location\rtx5070_env\lib\site-packages (from torch) (3.19.1) Requirement already satisfied: mpmath<1.4,>=1.1.0 in d:\new_location\rtx5070_env\lib\site-packages (from sympy==1.13.1->torch) (1.3.0) Collecting pillow!=8.3.*,>=5.3.0 Obtaining dependency information for pillow!=8.3.*,>=5.3.0 from https://download.pytorch.org/whl/pillow-11.0.0-cp310-cp310-win_amd64.whl.metadata Downloading https://download.pytorch.org/whl/pillow-11.0.0-cp310-cp310-win_amd64.whl.metadata (9.3 kB) Requirement already satisfied: numpy in d:\new_location\rtx5070_env\lib\site-packages (from torchvision) (2.2.6) Requirement already satisfied: MarkupSafe>=2.0 in d:\new_location\rtx5070_env\lib\site-packages (from jinja2->torch) (3.0.2) Downloading https://download.pytorch.org/whl/pillow-11.0.0-cp310-cp310-win_amd64.whl (2.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 5.3 MB/s eta 0:00:00 Using cached https://download.pytorch.org/whl/pillow-11.0.0-cp310-cp310-win_amd64.whl (2.6 MB) Installing collected packages: sympy, pillow, torch, torchvision, torchaudio Attempting uninstall: sympy Found existing installation: sympy 1.14.0 Uninstalling sympy-1.14.0: Successfully uninstalled sympy-1.14.0 Successfully installed pillow-11.0.0 sympy-1.13.1 torch-2.5.1+cu121 torchaudio-2.5.1+cu121 torchvision-0.20.1+cu121 [notice] A new release of pip available: 22.3.1 -> 25.2 [notice] To update, run: python.exe -m pip install --upgrade pip (rtx5070_env) PS E:\PyTorch_Build\pytorch> python -c "import torch; print(f'CUDA可用: {torch.cuda.is_available()}\n设备名称: {torch.cuda.get_device_name(0)}')" Traceback (most recent call last): File "<string>", line 1, in <module> File "E:\PyTorch_Build\pytorch\torch\__init__.py", line 1001, in <module> raise ImportError( ImportError: Failed to load PyTorch C extensions: It appears that PyTorch has loaded the `torch/_C` folder of the PyTorch repository rather than the C extensions which are expected in the `torch._C` namespace. This can occur when using the `install` workflow. e.g. $ python -m pip install --no-build-isolation -v . && python -c "import torch" This error can generally be solved using the `develop` workflow $ python -m pip install --no-build-isolation -v -e . && python -c "import torch" # This should succeed or by running Python from a different directory. (rtx5070_env) PS E:\PyTorch_Build\pytorch> New-PyEnv -name "experimental-env" 环境已创建: E:\PyTorch_Build\pytorch\experimental-env (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 1. 创建环境快照(在源环境中) (rtx5070_env) PS E:\PyTorch_Build\pytorch> pip list --format=freeze --isolated > requirements.txt [notice] A new release of pip available: 22.3.1 -> 25.2 [notice] To update, run: python.exe -m pip install --upgrade pip (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 2. 在新位置重建环境 (rtx5070_env) PS E:\PyTorch_Build\pytorch> $newPath = "D:\New_Location\rtx5070_env" (rtx5070_env) PS E:\PyTorch_Build\pytorch> python -m venv $newPath --copies --clear Error: [WinError 5] 拒绝访问。: 'D:\\New_Location\\rtx5070_env\\Scripts\\python.exe' (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 3. 修复激活脚本 (rtx5070_env) PS E:\PyTorch_Build\pytorch> $newActivate = "$newPath\Scripts\Activate.ps1" (rtx5070_env) PS E:\PyTorch_Build\pytorch> (Get-Content $newActivate) -replace 'param\(\[switch\]\$.+\)' | Set-Content $newActivate Get-Content: Cannot find path 'D:\New_Location\rtx5070_env\Scripts\Activate.ps1' because it does not exist. (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 4. 安装依赖 (rtx5070_env) PS E:\PyTorch_Build\pytorch> . "$newPath\Scripts\Activate.ps1" .: The term 'D:\New_Location\rtx5070_env\Scripts\Activate.ps1' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (rtx5070_env) PS E:\PyTorch_Build\pytorch> pip install --upgrade pip Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: pip in e:\python310\lib\site-packages (25.2) WARNING: Error parsing dependencies of torch: [Errno 2] No such file or directory: 'e:\\python310\\lib\\site-packages\\torch-2.6.0.dev20241112+cu121.dist-info\\METADATA' (rtx5070_env) PS E:\PyTorch_Build\pytorch> pip install -r requirements.txt --isolated Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: attrs==25.3.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 1)) (25.3.0) Requirement already satisfied: build==1.3.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 2)) (1.3.0) Requirement already satisfied: certifi==2025.8.3 in e:\python310\lib\site-packages (from -r requirements.txt (line 3)) (2025.8.3) Requirement already satisfied: charset-normalizer==3.4.3 in e:\python310\lib\site-packages (from -r requirements.txt (line 4)) (3.4.3) Requirement already satisfied: cmake==4.1.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 5)) (4.1.0) Requirement already satisfied: colorama==0.4.6 in e:\python310\lib\site-packages (from -r requirements.txt (line 6)) (0.4.6) Requirement already satisfied: exceptiongroup==1.3.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 7)) (1.3.0) Requirement already satisfied: expecttest==0.3.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 8)) (0.3.0) Requirement already satisfied: filelock==3.19.1 in e:\python310\lib\site-packages (from -r requirements.txt (line 9)) (3.19.1) Collecting fsspec==2025.9.0 (from -r requirements.txt (line 10)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/47/71/70db47e4f6ce3e5c37a607355f80da8860a33226be640226ac52cb05ef2e/fsspec-2025.9.0-py3-none-any.whl (199 kB) Collecting hypothesis==6.138.14 (from -r requirements.txt (line 11)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/55/2e/fcf7371887f45083472165b21b68a7f552049334e01dc3febe484bbb7bc4/hypothesis-6.138.14-py3-none-any.whl (533 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 533.6/533.6 kB 17.0 MB/s 0:00:00 Requirement already satisfied: idna==3.10 in e:\python310\lib\site-packages (from -r requirements.txt (line 12)) (3.10) Requirement already satisfied: Jinja2==3.1.6 in e:\python310\lib\site-packages (from -r requirements.txt (line 13)) (3.1.6) Requirement already satisfied: lintrunner==0.12.7 in e:\python310\lib\site-packages (from -r requirements.txt (line 14)) (0.12.7) Collecting MarkupSafe==3.0.2 (from -r requirements.txt (line 15)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/44/06/e7175d06dd6e9172d4a69a72592cb3f7a996a9c396eee29082826449bbc3/MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl (15 kB) Requirement already satisfied: mpmath==1.3.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 16)) (1.3.0) Requirement already satisfied: networkx==3.4.2 in e:\python310\lib\site-packages (from -r requirements.txt (line 17)) (3.4.2) Requirement already satisfied: ninja==1.13.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 18)) (1.13.0) Collecting numpy==2.2.6 (from -r requirements.txt (line 19)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl (12.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.9/12.9 MB 47.5 MB/s 0:00:00 Requirement already satisfied: optree==0.17.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 20)) (0.17.0) Requirement already satisfied: packaging==25.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 21)) (25.0) Collecting pillow==11.0.0 (from -r requirements.txt (line 22)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d5/4e/78f7c5202ea2a772a5ab05069c1b82503e6353cd79c7e474d4945f4b82c3/pillow-11.0.0-cp310-cp310-win_amd64.whl (2.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 144.0 MB/s 0:00:00 Collecting pip==22.3.1 (from -r requirements.txt (line 23)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/09/bd/2410905c76ee14c62baf69e3f4aa780226c1bbfc9485731ad018e35b0cb5/pip-22.3.1-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 111.8 MB/s 0:00:00 Collecting psutil==7.0.0 (from -r requirements.txt (line 24)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/50/1b/6921afe68c74868b4c9fa424dad3be35b095e16687989ebbb50ce4fceb7c/psutil-7.0.0-cp37-abi3-win_amd64.whl (244 kB) Requirement already satisfied: pyproject_hooks==1.2.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 25)) (1.2.0) Requirement already satisfied: PyYAML==6.0.2 in e:\python310\lib\site-packages (from -r requirements.txt (line 26)) (6.0.2) Collecting requests==2.32.5 (from -r requirements.txt (line 27)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl (64 kB) Requirement already satisfied: setuptools==79.0.1 in e:\python310\lib\site-packages (from -r requirements.txt (line 28)) (79.0.1) Requirement already satisfied: six==1.17.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 29)) (1.17.0) Requirement already satisfied: sortedcontainers==2.4.0 in e:\python310\lib\site-packages (from -r requirements.txt (line 30)) (2.4.0) Collecting sympy==1.13.1 (from -r requirements.txt (line 31)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b2/fe/81695a1aa331a842b582453b605175f419fe8540355886031328089d840a/sympy-1.13.1-py3-none-any.whl (6.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 63.1 MB/s 0:00:00 Requirement already satisfied: tomli==2.2.1 in e:\python310\lib\site-packages (from -r requirements.txt (line 32)) (2.2.1) ERROR: Ignored the following versions that require a different python version: 2.3.0 Requires-Python >=3.11; 2.3.1 Requires-Python >=3.11; 2.3.2 Requires-Python >=3.11 ERROR: Could not find a version that satisfies the requirement torch==2.5.1+cu121 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.7.1, 2.8.0) ERROR: No matching distribution found for torch==2.5.1+cu121 (rtx5070_env) PS E:\PyTorch_Build\pytorch> Set-ExecutionPolicy Bypass -Scope Process -Force (rtx5070_env) PS E:\PyTorch_Build\pytorch> .\create_venv_fixed.ps1 终止Python进程... 删除旧环境... 创建虚拟环境... 修复激活脚本... Get-Content: E:\PyTorch_Build\pytorch\create_venv_fixed.ps1:21 Line | 21 | (Get-Content $activatePath) -replace 'param\(\[switch\]\$.+\)' | Set- … | ~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot find path 'E:\PyTorch_Build\pytorch\rtx5070_env\Scripts\Activate.ps1' because it does not exist. 更新启动配置... 虚拟环境创建完成!输入 Enter-PyEnv 激活 (rtx5070_env) PS E:\PyTorch_Build\pytorch>
09-07
(pytorch_env) PS E:\PyTorch_Build\pytorch> # 安装支持 sm_120 架构的 PyTorch Nightly 版本 (pytorch_env) PS E:\PyTorch_Build\pytorch> pip uninstall -y torch torchvision torchaudio Found existing installation: torch 2.3.0+cu121 Uninstalling torch-2.3.0+cu121: Successfully uninstalled torch-2.3.0+cu121 Found existing installation: torchvision 0.18.0+cu121 Uninstalling torchvision-0.18.0+cu121: Successfully uninstalled torchvision-0.18.0+cu121 Found existing installation: torchaudio 2.3.0+cu121 Uninstalling torchaudio-2.3.0+cu121: Successfully uninstalled torchaudio-2.3.0+cu121 (pytorch_env) PS E:\PyTorch_Build\pytorch> pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121 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) Requirement already satisfied: filelock in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from torch) (3.19.1) Requirement already satisfied: typing-extensions>=4.10.0 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from torch) (4.15.0) Requirement already satisfied: networkx in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from torch) (3.4.2) Requirement already satisfied: jinja2 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from torch) (3.1.6) Requirement already satisfied: fsspec in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from torch) (2025.7.0) Requirement already satisfied: sympy==1.13.1 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from torch) (1.13.1) Requirement already satisfied: mpmath<1.4,>=1.1.0 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from sympy==1.13.1->torch) (1.3.0) Requirement already satisfied: numpy in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from torchvision) (2.1.2) Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from torchvision) (11.0.0) Requirement already satisfied: MarkupSafe>=2.0 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from jinja2->torch) (3.0.2) Installing collected packages: torch, torchvision, torchaudio Successfully installed torch-2.6.0.dev20241112+cu121 torchaudio-2.5.0.dev20241112+cu121 torchvision-0.20.0.dev20241112+cu121 (pytorch_env) PS E:\PyTorch_Build\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch> # 或者从源码编译支持 sm_120 (pytorch_env) PS E:\PyTorch_Build\pytorch> git clone --depth 1 --branch release/2.4 https://github.com/pytorch/pytorch Cloning into 'pytorch'... remote: Enumerating objects: 11178, done. remote: Counting objects: 100% (11178/11178), done. remote: Compressing objects: 100% (9646/9646), done. remote: Total 11178 (delta 1404), reused 6483 (delta 1248), pack-reused 0 (from 0) Receiving objects: 100% (11178/11178), 99.55 MiB | 2.38 MiB/s, done. Resolving deltas: 100% (1404/1404), done. Updating files: 100% (15987/15987), done. (pytorch_env) PS E:\PyTorch_Build\pytorch> cd pytorch (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> pip install -r requirements.txt Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Ignoring setuptools: markers 'python_version >= "3.12"' don't match your environment Collecting astunparse (from -r requirements.txt (line 2)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2b/03/13dde6512ad7b4557eb792fbcf0c653af6076b81e5941d36ec61f7ce6028/astunparse-1.6.3-py2.py3-none-any.whl (12 kB) Collecting expecttest!=0.2.0 (from -r requirements.txt (line 3)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/27/fb/deeefea1ea549273817ca7bed3db2f39cc238a75a745a20e3651619f7335/expecttest-0.3.0-py3-none-any.whl (8.2 kB) Collecting hypothesis (from -r requirements.txt (line 4)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f7/fb/0eca64797a914b73a3601ed0c8941764d0b4232a4900eb03502e1daf8407/hypothesis-6.138.11-py3-none-any.whl (533 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 533.4/533.4 kB 17.0 MB/s 0:00:00 Requirement already satisfied: numpy in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 5)) (2.1.2) Collecting psutil (from -r requirements.txt (line 6)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/50/1b/6921afe68c74868b4c9fa424dad3be35b095e16687989ebbb50ce4fceb7c/psutil-7.0.0-cp37-abi3-win_amd64.whl (244 kB) Requirement already satisfied: pyyaml in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 7)) (6.0.2) Collecting requests (from -r requirements.txt (line 8)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl (64 kB) Requirement already satisfied: setuptools in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 9)) (80.9.0) Collecting types-dataclasses (from -r requirements.txt (line 10)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/31/85/23ab2bbc280266af5bf22ded4e070946d1694d1721ced90666b649eaa795/types_dataclasses-0.6.6-py3-none-any.whl (2.9 kB) Requirement already satisfied: typing-extensions>=4.8.0 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 11)) (4.15.0) Requirement already satisfied: sympy in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 12)) (1.13.1) Requirement already satisfied: filelock in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 13)) (3.19.1) Requirement already satisfied: networkx in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 14)) (3.4.2) Requirement already satisfied: jinja2 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 15)) (3.1.6) Requirement already satisfied: fsspec in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 16)) (2025.7.0) Collecting lintrunner (from -r requirements.txt (line 17)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/40/c1/eb0184a324dd25e19b84e52fc44c6262710677737c8acca5d545b3d25ffb/lintrunner-0.12.7-py3-none-win_amd64.whl (1.7 MB) Requirement already satisfied: ninja in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from -r requirements.txt (line 18)) (1.13.0) Collecting packaging (from -r requirements.txt (line 21)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl (66 kB) Collecting optree>=0.11.0 (from -r requirements.txt (line 22)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/74/fa/83d4cd387043483ee23617b048829a1289bf54afe2f6cb98ec7b27133369/optree-0.17.0-cp310-cp310-win_amd64.whl (304 kB) Requirement already satisfied: wheel<1.0,>=0.23.0 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from astunparse->-r requirements.txt (line 2)) (0.45.1) Collecting six<2.0,>=1.6.1 (from astunparse->-r requirements.txt (line 2)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl (11 kB) Collecting attrs>=22.2.0 (from hypothesis->-r requirements.txt (line 4)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl (63 kB) Collecting exceptiongroup>=1.0.0 (from hypothesis->-r requirements.txt (line 4)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/36/f4/c6e662dade71f56cd2f3735141b265c3c79293c109549c1e6933b0651ffc/exceptiongroup-1.3.0-py3-none-any.whl (16 kB) Collecting sortedcontainers<3.0.0,>=2.1.0 (from hypothesis->-r requirements.txt (line 4)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB) Collecting charset_normalizer<4,>=2 (from requests->-r requirements.txt (line 8)) 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 (from requests->-r requirements.txt (line 8)) 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 (from requests->-r requirements.txt (line 8)) 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 (from requests->-r requirements.txt (line 8)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e5/48/1549795ba7742c948d2ad169c1c8cdbae65bc450d6cd753d124b17c8cd32/certifi-2025.8.3-py3-none-any.whl (161 kB) Requirement already satisfied: mpmath<1.4,>=1.1.0 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from sympy->-r requirements.txt (line 12)) (1.3.0) Requirement already satisfied: MarkupSafe>=2.0 in e:\pytorch_build\pytorch\pytorch_env\lib\site-packages (from jinja2->-r requirements.txt (line 15)) (3.0.2) Installing collected packages: types-dataclasses, sortedcontainers, urllib3, six, psutil, packaging, optree, lintrunner, idna, expecttest, exceptiongroup, charset_normalizer, certifi, attrs, requests, hypothesis, astunparse Successfully installed astunparse-1.6.3 attrs-25.3.0 certifi-2025.8.3 charset_normalizer-3.4.3 exceptiongroup-1.3.0 expecttest-0.3.0 hypothesis-6.138.11 idna-3.10 lintrunner-0.12.7 optree-0.17.0 packaging-25.0 psutil-7.0.0 requests-2.32.5 six-1.17.0 sortedcontainers-2.4.0 types-dataclasses-0.6.6 urllib3-2.5.0 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> # 设置计算能力环境变量 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> $env:TORCH_CUDA_ARCH_LIST="8.9;9.0" # RTX 5070 需要 8.9+ (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> # 开始编译 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> python setup.py install Building wheel torch-2.4.0a0+gitee1b680 -- Building version 2.4.0a0+gitee1b680 --- Trying to initialize submodules Submodule 'android/libs/fbjni' (https://github.com/facebookincubator/fbjni.git) registered for path 'android/libs/fbjni' Submodule 'third_party/NNPACK_deps/FP16' (https://github.com/Maratyszcza/FP16.git) registered for path 'third_party/FP16' Submodule 'third_party/NNPACK_deps/FXdiv' (https://github.com/Maratyszcza/FXdiv.git) registered for path 'third_party/FXdiv' Submodule 'third_party/NNPACK' (https://github.com/Maratyszcza/NNPACK.git) registered for path 'third_party/NNPACK' Submodule 'third_party/VulkanMemoryAllocator' (https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git) registered for path 'third_party/VulkanMemoryAllocator' Submodule 'third_party/XNNPACK' (https://github.com/google/XNNPACK.git) registered for path 'third_party/XNNPACK' Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'third_party/benchmark' Submodule 'third_party/cpp-httplib' (https://github.com/yhirose/cpp-httplib.git) registered for path 'third_party/cpp-httplib' Submodule 'third_party/cpuinfo' (https://github.com/pytorch/cpuinfo.git) registered for path 'third_party/cpuinfo' Submodule 'third_party/cudnn_frontend' (https://github.com/NVIDIA/cudnn-frontend.git) registered for path 'third_party/cudnn_frontend' Submodule 'third_party/cutlass' (https://github.com/NVIDIA/cutlass.git) registered for path 'third_party/cutlass' Submodule 'third_party/eigen' (https://gitlab.com/libeigen/eigen.git) registered for path 'third_party/eigen' Submodule 'third_party/fbgemm' (https://github.com/pytorch/fbgemm) registered for path 'third_party/fbgemm' Submodule 'third_party/flatbuffers' (https://github.com/google/flatbuffers.git) registered for path 'third_party/flatbuffers' Submodule 'third_party/fmt' (https://github.com/fmtlib/fmt.git) registered for path 'third_party/fmt' Submodule 'third_party/foxi' (https://github.com/houseroad/foxi.git) registered for path 'third_party/foxi' Submodule 'third_party/gemmlowp/gemmlowp' (https://github.com/google/gemmlowp.git) registered for path 'third_party/gemmlowp/gemmlowp' Submodule 'third_party/gloo' (https://github.com/facebookincubator/gloo) registered for path 'third_party/gloo' Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/googletest' Submodule 'third_party/ideep' (https://github.com/intel/ideep) registered for path 'third_party/ideep' Submodule 'third_party/ittapi' (https://github.com/intel/ittapi.git) registered for path 'third_party/ittapi' Submodule 'third_party/kineto' (https://github.com/pytorch/kineto) registered for path 'third_party/kineto' Submodule 'third_party/mimalloc' (https://github.com/microsoft/mimalloc.git) registered for path 'third_party/mimalloc' Submodule 'third_party/nccl/nccl' (https://github.com/NVIDIA/nccl) registered for path 'third_party/nccl/nccl' Submodule 'third_party/nlohmann' (https://github.com/nlohmann/json.git) registered for path 'third_party/nlohmann' Submodule 'third_party/onnx' (https://github.com/onnx/onnx.git) registered for path 'third_party/onnx' Submodule 'third_party/opentelemetry-cpp' (https://github.com/open-telemetry/opentelemetry-cpp.git) registered for path 'third_party/opentelemetry-cpp' Submodule 'third_party/pocketfft' (https://github.com/mreineck/pocketfft) registered for path 'third_party/pocketfft' Submodule 'third_party/protobuf' (https://github.com/protocolbuffers/protobuf.git) registered for path 'third_party/protobuf' Submodule 'third_party/NNPACK_deps/psimd' (https://github.com/Maratyszcza/psimd.git) registered for path 'third_party/psimd' Submodule 'third_party/NNPACK_deps/pthreadpool' (https://github.com/Maratyszcza/pthreadpool.git) registered for path 'third_party/pthreadpool' Submodule 'third_party/pybind11' (https://github.com/pybind/pybind11.git) registered for path 'third_party/pybind11' Submodule 'third_party/python-peachpy' (https://github.com/malfet/PeachPy.git) registered for path 'third_party/python-peachpy' Submodule 'third_party/sleef' (https://github.com/shibatch/sleef) registered for path 'third_party/sleef' Submodule 'third_party/tensorpipe' (https://github.com/pytorch/tensorpipe.git) registered for path 'third_party/tensorpipe' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/android/libs/fbjni'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/FP16'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/FXdiv'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/NNPACK'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/VulkanMemoryAllocator'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/XNNPACK'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/benchmark'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/cpp-httplib'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/cpuinfo'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/cudnn_frontend'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/cutlass'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/eigen'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/fbgemm'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/flatbuffers'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/fmt'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/foxi'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/gemmlowp/gemmlowp'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/gloo'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/googletest'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/ideep'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/ittapi'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/mimalloc'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/nccl/nccl'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/nlohmann'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/onnx'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/pocketfft'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/protobuf'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/psimd'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/pthreadpool'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/pybind11'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/python-peachpy'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/sleef'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/tensorpipe'... Submodule path 'android/libs/fbjni': checked out '7e1e1fe3858c63c251c637ae41a20de425dde96f' Submodule path 'third_party/FP16': checked out '4dfe081cf6bcd15db339cf2680b9281b8451eeb3' Submodule path 'third_party/FXdiv': checked out 'b408327ac2a15ec3e43352421954f5b1967701d1' Submodule path 'third_party/NNPACK': checked out 'c07e3a0400713d546e0dea2d5466dd22ea389c73' Submodule path 'third_party/VulkanMemoryAllocator': checked out 'a6bfc237255a6bac1513f7c1ebde6d8aed6b5191' Submodule path 'third_party/XNNPACK': checked out 'fcbf55af6cf28a4627bcd1f703ab7ad843f0f3a2' Submodule path 'third_party/benchmark': checked out '0d98dba29d66e93259db7daa53a9327df767a415' Submodule path 'third_party/cpp-httplib': checked out '3b6597bba913d51161383657829b7e644e59c006' Submodule path 'third_party/cpuinfo': checked out 'd6860c477c99f1fce9e28eb206891af3c0e1a1d7' Submodule path 'third_party/cudnn_frontend': checked out 'b740542818f36857acf7f9853f749bbad4118c65' Submodule path 'third_party/cutlass': checked out 'bbe579a9e3beb6ea6626d9227ec32d0dae119a49' Submodule path 'third_party/eigen': checked out '3147391d946bb4b6c68edd901f2add6ac1f31f8c' Submodule path 'third_party/fbgemm': checked out 'dbc3157bf256f1339b3fa1fef2be89ac4078be0e' Submodule 'third_party/asmjit' (https://github.com/asmjit/asmjit.git) registered for path 'third_party/fbgemm/third_party/asmjit' Submodule 'third_party/cpuinfo' (https://github.com/pytorch/cpuinfo) registered for path 'third_party/fbgemm/third_party/cpuinfo' Submodule 'third_party/cutlass' (https://github.com/NVIDIA/cutlass.git) registered for path 'third_party/fbgemm/third_party/cutlass' Submodule 'third_party/googletest' (https://github.com/google/googletest) registered for path 'third_party/fbgemm/third_party/googletest' Submodule 'third_party/hipify_torch' (https://github.com/ROCmSoftwarePlatform/hipify_torch.git) registered for path 'third_party/fbgemm/third_party/hipify_torch' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/fbgemm/third_party/asmjit'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/fbgemm/third_party/cpuinfo'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/fbgemm/third_party/cutlass'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/fbgemm/third_party/googletest'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/fbgemm/third_party/hipify_torch'... Submodule path 'third_party/fbgemm/third_party/asmjit': checked out 'd3fbf7c9bc7c1d1365a94a45614b91c5a3706b81' Submodule path 'third_party/fbgemm/third_party/cpuinfo': checked out 'ed8b86a253800bafdb7b25c5c399f91bff9cb1f3' Submodule path 'third_party/fbgemm/third_party/cutlass': checked out 'fc9ebc645b63f3a6bc80aaefde5c063fb72110d6' Submodule path 'third_party/fbgemm/third_party/googletest': checked out 'cbf019de22c8dd37b2108da35b2748fd702d1796' Submodule path 'third_party/fbgemm/third_party/hipify_torch': checked out '23f53b025b466d8ec3c45d52290d3442f7fbe6b1' Submodule path 'third_party/flatbuffers': checked out '01834de25e4bf3975a9a00e816292b1ad0fe184b' Submodule path 'third_party/fmt': checked out 'e69e5f977d458f2650bb346dadf2ad30c5320281' Submodule path 'third_party/foxi': checked out 'c278588e34e535f0bb8f00df3880d26928038cad' Submodule path 'third_party/gemmlowp/gemmlowp': checked out '3fb5c176c17c765a3492cd2f0321b0dab712f350' Submodule path 'third_party/gloo': checked out '5354032ea08eadd7fc4456477f7f7c6308818509' Submodule path 'third_party/googletest': checked out 'e2239ee6043f73722e7aa812a459f54a28552929' Submodule path 'third_party/ideep': checked out '55ca0191687aaf19aca5cdb7881c791e3bea442b' Submodule 'mkl-dnn' (https://github.com/intel/mkl-dnn.git) registered for path 'third_party/ideep/mkl-dnn' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/ideep/mkl-dnn'... Submodule path 'third_party/ideep/mkl-dnn': checked out '1137e04ec0b5251ca2b4400a4fd3c667ce843d67' Submodule path 'third_party/ittapi': checked out '5b8a7d7422611c3a0d799fb5fc5dd4abfae35b42' Submodule path 'third_party/kineto': checked out 'be1317644c68b4bfc4646024a6b221066e430031' Submodule 'libkineto/third_party/dynolog' (https://github.com/facebookincubator/dynolog.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog' Submodule 'libkineto/third_party/fmt' (https://github.com/fmtlib/fmt.git) registered for path 'third_party/kineto/libkineto/third_party/fmt' Submodule 'libkineto/third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/kineto/libkineto/third_party/googletest' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/fmt'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/googletest'... Submodule path 'third_party/kineto/libkineto/third_party/dynolog': checked out '7d04a0053a845370ae06ce317a22a48e9edcc74e' Submodule 'third_party/DCGM' (https://github.com/NVIDIA/DCGM.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM' Submodule 'third_party/cpr' (https://github.com/libcpr/cpr.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog/third_party/cpr' Submodule 'third_party/fmt' (https://github.com/fmtlib/fmt.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog/third_party/fmt' Submodule 'third_party/gflags' (https://github.com/gflags/gflags.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog/third_party/gflags' Submodule 'third_party/glog' (https://github.com/google/glog.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog/third_party/glog' Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog/third_party/googletest' Submodule 'third_party/json' (https://github.com/nlohmann/json.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog/third_party/json' Submodule 'third_party/pfs' (https://github.com/dtrugman/pfs.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog/third_party/pfs' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/cpr'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/fmt'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/gflags'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/glog'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/googletest'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/json'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/pfs'... Submodule path 'third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM': checked out 'ffde4e54bc7249a6039a5e6b45b395141e1217f9' Submodule path 'third_party/kineto/libkineto/third_party/dynolog/third_party/cpr': checked out '871ed52d350214a034f6ef8a3b8f51c5ce1bd400' Submodule path 'third_party/kineto/libkineto/third_party/dynolog/third_party/fmt': checked out 'cd4af11efc9c622896a3e4cb599fa28668ca3d05' Submodule path 'third_party/kineto/libkineto/third_party/dynolog/third_party/gflags': checked out 'e171aa2d15ed9eb17054558e0b3a6a413bb01067' Submodule 'doc' (https://github.com/gflags/gflags.git) registered for path 'third_party/kineto/libkineto/third_party/dynolog/third_party/gflags/doc' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/kineto/libkineto/third_party/dynolog/third_party/gflags/doc'... Submodule path 'third_party/kineto/libkineto/third_party/dynolog/third_party/gflags/doc': checked out '8411df715cf522606e3b1aca386ddfc0b63d34b4' Submodule path 'third_party/kineto/libkineto/third_party/dynolog/third_party/glog': checked out 'b33e3bad4c46c8a6345525fd822af355e5ef9446' Submodule path 'third_party/kineto/libkineto/third_party/dynolog/third_party/googletest': checked out '58d77fa8070e8cec2dc1ed015d66b454c8d78850' Submodule path 'third_party/kineto/libkineto/third_party/dynolog/third_party/json': checked out '4f8fba14066156b73f1189a2b8bd568bde5284c5' Submodule path 'third_party/kineto/libkineto/third_party/dynolog/third_party/pfs': checked out 'f68a2fa8ea36c783bdd760371411fcb495aa3150' Submodule path 'third_party/kineto/libkineto/third_party/fmt': checked out 'a33701196adfad74917046096bf5a2aa0ab0bb50' Submodule path 'third_party/kineto/libkineto/third_party/googletest': checked out '7aca84427f224eeed3144123d5230d5871e93347' Submodule path 'third_party/mimalloc': checked out 'b66e3214d8a104669c2ec05ae91ebc26a8f5ab78' Submodule path 'third_party/nccl/nccl': checked out '48bb7fec7953112ff37499a272317f6663f8f600' Submodule path 'third_party/nlohmann': checked out '87cda1d6646592ac5866dc703c8e1839046a6806' Submodule path 'third_party/onnx': checked out '990217f043af7222348ca8f0301e17fa7b841781' Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'third_party/onnx/third_party/benchmark' Submodule 'third_party/pybind11' (https://github.com/pybind/pybind11.git) registered for path 'third_party/onnx/third_party/pybind11' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/onnx/third_party/benchmark'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/onnx/third_party/pybind11'... Submodule path 'third_party/onnx/third_party/benchmark': checked out '2dd015dfef425c866d9a43f2c67d8b52d709acb6' Submodule path 'third_party/onnx/third_party/pybind11': checked out '5b0a6fc2017fcc176545afe3e09c9f9885283242' Submodule path 'third_party/opentelemetry-cpp': checked out 'a799f4aed9c94b765dcdaabaeab7d5e7e2310878' Submodule 'third_party/benchmark' (https://github.com/google/benchmark) registered for path 'third_party/opentelemetry-cpp/third_party/benchmark' Submodule 'third_party/googletest' (https://github.com/google/googletest) registered for path 'third_party/opentelemetry-cpp/third_party/googletest' Submodule 'third_party/ms-gsl' (https://github.com/microsoft/GSL) registered for path 'third_party/opentelemetry-cpp/third_party/ms-gsl' Submodule 'third_party/nlohmann-json' (https://github.com/nlohmann/json) registered for path 'third_party/opentelemetry-cpp/third_party/nlohmann-json' Submodule 'third_party/opentelemetry-proto' (https://github.com/open-telemetry/opentelemetry-proto) registered for path 'third_party/opentelemetry-cpp/third_party/opentelemetry-proto' Submodule 'third_party/opentracing-cpp' (https://github.com/opentracing/opentracing-cpp.git) registered for path 'third_party/opentelemetry-cpp/third_party/opentracing-cpp' Submodule 'third_party/prometheus-cpp' (https://github.com/jupp0r/prometheus-cpp) registered for path 'third_party/opentelemetry-cpp/third_party/prometheus-cpp' Submodule 'tools/vcpkg' (https://github.com/Microsoft/vcpkg) registered for path 'third_party/opentelemetry-cpp/tools/vcpkg' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/third_party/benchmark'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/third_party/googletest'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/third_party/ms-gsl'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/third_party/nlohmann-json'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/third_party/opentelemetry-proto'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/third_party/opentracing-cpp'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/tools/vcpkg'... Submodule path 'third_party/opentelemetry-cpp/third_party/benchmark': checked out 'd572f4777349d43653b21d6c2fc63020ab326db2' Submodule path 'third_party/opentelemetry-cpp/third_party/googletest': checked out 'b796f7d44681514f58a683a3a71ff17c94edb0c1' Submodule path 'third_party/opentelemetry-cpp/third_party/ms-gsl': checked out '6f4529395c5b7c2d661812257cd6780c67e54afa' Submodule path 'third_party/opentelemetry-cpp/third_party/nlohmann-json': checked out 'bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d' Submodule path 'third_party/opentelemetry-cpp/third_party/opentelemetry-proto': checked out '4ca4f0335c63cda7ab31ea7ed70d6553aee14dce' Submodule path 'third_party/opentelemetry-cpp/third_party/opentracing-cpp': checked out '06b57f48ded1fa3bdd3d4346f6ef29e40e08eaf5' Submodule path 'third_party/opentelemetry-cpp/third_party/prometheus-cpp': checked out 'c9ffcdda9086ffd9e1283ea7a0276d831f3c8a8d' Submodule 'civetweb' (https://github.com/civetweb/civetweb.git) registered for path 'third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb' Submodule 'googletest' (https://github.com/google/googletest.git) registered for path 'third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest'... Submodule path 'third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb': checked out 'eefb26f82b233268fc98577d265352720d477ba4' Submodule path 'third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest': checked out 'e2239ee6043f73722e7aa812a459f54a28552929' Submodule path 'third_party/opentelemetry-cpp/tools/vcpkg': checked out '8eb57355a4ffb410a2e94c07b4dca2dffbee8e50' Submodule path 'third_party/pocketfft': checked out '9d3ab05a7fffbc71a492bc6a17be034e83e8f0fe' Submodule path 'third_party/protobuf': checked out 'd1eca4e4b421cd2997495c4b4e65cea6be4e9b8a' Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'third_party/protobuf/third_party/benchmark' Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/protobuf/third_party/googletest' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/protobuf/third_party/benchmark'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/protobuf/third_party/googletest'... Submodule path 'third_party/protobuf/third_party/benchmark': checked out '5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8' Submodule path 'third_party/protobuf/third_party/googletest': checked out '5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081' Submodule path 'third_party/psimd': checked out '072586a71b55b7f8c584153d223e95687148a900' Submodule path 'third_party/pthreadpool': checked out '4fe0e1e183925bf8cfa6aae24237e724a96479b8' Submodule path 'third_party/pybind11': checked out '3e9dfa2866941655c56877882565e7577de6fc7b' Submodule path 'third_party/python-peachpy': checked out 'f45429b087dd7d5bc78bb40dc7cf06425c252d67' Submodule path 'third_party/sleef': checked out '60e76d2bce17d278b439d9da17177c8f957a9e9b' Submodule path 'third_party/tensorpipe': checked out '52791a2fd214b2a9dc5759d36725909c1daa7f2e' Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/tensorpipe/third_party/googletest' Submodule 'third_party/libnop' (https://github.com/google/libnop.git) registered for path 'third_party/tensorpipe/third_party/libnop' Submodule 'third_party/libuv' (https://github.com/libuv/libuv.git) registered for path 'third_party/tensorpipe/third_party/libuv' Submodule 'third_party/pybind11' (https://github.com/pybind/pybind11.git) registered for path 'third_party/tensorpipe/third_party/pybind11' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/tensorpipe/third_party/googletest'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/tensorpipe/third_party/libnop'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/tensorpipe/third_party/libuv'... Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/tensorpipe/third_party/pybind11'... Submodule path 'third_party/tensorpipe/third_party/googletest': checked out 'aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e' Submodule path 'third_party/tensorpipe/third_party/libnop': checked out '910b55815be16109f04f4180e9adee14fb4ce281' Submodule path 'third_party/tensorpipe/third_party/libuv': checked out '1dff88e5161cba5c59276d2070d2e304e4dcb242' Submodule path 'third_party/tensorpipe/third_party/pybind11': checked out 'a23996fce38ff6ccfbcdc09f1e63f2c4be5ea2ef' Submodule 'tools/clang' (https://github.com/wjakob/clang-cindex-python3) registered for path 'third_party/tensorpipe/third_party/pybind11/tools/clang' Cloning into 'E:/PyTorch_Build/pytorch/pytorch/third_party/tensorpipe/third_party/pybind11/tools/clang'... Submodule path 'third_party/tensorpipe/third_party/pybind11/tools/clang': checked out '6a00cbc4a9b8e68b71caf7f774b3f9c753ae84d5' --- Submodule initialization took 555.36 sec Traceback (most recent call last): File "E:\PyTorch_Build\pytorch\pytorch\setup.py", line 1510, in <module> main() File "E:\PyTorch_Build\pytorch\pytorch\setup.py", line 1176, in main build_deps() File "E:\PyTorch_Build\pytorch\pytorch\setup.py", line 471, in build_deps build_caffe2( File "E:\PyTorch_Build\pytorch\pytorch\tools\build_pytorch_libs.py", line 82, in build_caffe2 my_env = _create_build_env() File "E:\PyTorch_Build\pytorch\pytorch\tools\build_pytorch_libs.py", line 68, in _create_build_env my_env = _overlay_windows_vcvars(my_env) File "E:\PyTorch_Build\pytorch\pytorch\tools\build_pytorch_libs.py", line 37, in _overlay_windows_vcvars vc_env: Dict[str, str] = distutils._msvccompiler._get_vc_env(vc_arch) AttributeError: module 'distutils' has no attribute '_msvccompiler'. Did you mean: 'ccompiler'? (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> # 降级 NumPy 到兼容版本 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> pip uninstall -y numpy Found existing installation: numpy 2.1.2 Uninstalling numpy-2.1.2: Successfully uninstalled numpy-2.1.2 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> pip install numpy==1.26.4 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting numpy==1.26.4 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/19/77/538f202862b9183f54108557bfda67e17603fc560c384559e769321c9d92/numpy-1.26.4-cp310-cp310-win_amd64.whl (15.8 MB) Installing collected packages: numpy Successfully installed numpy-1.26.4 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> # 安装兼容的 PyTorch 版本 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> pip install torch==2.3.0+cu121 torchvision==0.18.0+cu121 --no-deps Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple ERROR: Could not find a version that satisfies the requirement torch==2.3.0+cu121 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.7.1, 2.8.0) ERROR: No matching distribution found for torch==2.3.0+cu121 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> import torch import: The term 'import' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> import numpy as np import: The term 'import' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print('='*50) 无法初始化设备 PRN (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print(f'PyTorch 版本: {torch.__version__}') fPyTorch 版本: {torch.__version__}: The term 'fPyTorch 版本: {torch.__version__}' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print(f'CUDA 可用: {torch.cuda.is_available()}') fCUDA 可用: {torch.cuda.is_available()}: The term 'fCUDA 可用: {torch.cuda.is_available()}' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print(f'CUDA 版本: {torch.version.cuda}') fCUDA 版本: {torch.version.cuda}: The term 'fCUDA 版本: {torch.version.cuda}' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print(f'cuDNN 版本: {torch.backends.cudnn.version()}') fcuDNN 版本: {torch.backends.cudnn.version()}: The term 'fcuDNN 版本: {torch.backends.cudnn.version()}' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print(f'GPU 名称: {torch.cuda.get_device_name(0)}') fGPU 名称: {torch.cuda.get_device_name(0)}: The term 'fGPU 名称: {torch.cuda.get_device_name(0)}' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print(f'计算能力: {torch.cuda.get_device_capability(0)}') f计算能力: {torch.cuda.get_device_capability(0)}: The term 'f计算能力: {torch.cuda.get_device_capability(0)}' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> # 简单 CUDA 测试 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> x = torch.randn(100, 100, device='cuda') ParserError: Line | 1 | x = torch.randn(100, 100, device='cuda') | ~ | Missing expression after ','. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> y = torch.randn(100, 100, device='cuda') ParserError: Line | 1 | y = torch.randn(100, 100, device='cuda') | ~ | Missing expression after ','. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> z = x @ y ParserError: Line | 1 | z = x @ y | ~ | Unrecognized token in source text. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print(f'矩阵乘法完成: {z.size()}') f矩阵乘法完成: {z.size()}: The term 'f矩阵乘法完成: {z.size()}' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> # NumPy 互操作测试 (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> a = np.random.rand(100, 100) a: The term 'a' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> b = torch.from_numpy(a).cuda() a: The term 'a' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> c = b.cpu().numpy() ParserError: Line | 1 | c = b.cpu().numpy() | ~ | An expression was expected after '('. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print(f'NumPy 互操作测试成功: {c.shape == a.shape}') fNumPy 互操作测试成功: {c.shape == a.shape}: The term 'fNumPy 互操作测试成功: {c.shape == a.shape}' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch> print('='*50) 无法初始化设备 PRN (pytorch_env) PS E:\PyTorch_Build\pytorch\pytorch>
09-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值