# Install pytorch 2.5 using intel GPU (XPU)

**URL:** <https://discuss.pytorch.org/t/install-pytorch-2-5-using-intel-gpu-xpu/209844>\
**Category:** windows\
**Created:** [September 20, 2024, 2:01am UTC](https://discuss.pytorch.org/t/install-pytorch-2-5-using-intel-gpu-xpu/209844 "2024-09-20T02:01:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![triilman25](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/triilman25/32/72870_2.png) [@triilman25](https://discuss.pytorch.org/u/triilman25)\
**Post date:** [September 20, 2024, 2:01am UTC](https://discuss.pytorch.org/t/install-pytorch-2-5-using-intel-gpu-xpu/209844/1 "2024-09-20T02:01:09Z")

</div>

I got error bellow errors when I was run command:  
the commands:

```auto
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
python setup.py develop

```

the error:

```auto
CMake Error at third_party/kineto/libkineto/src/plugin/xpupti/CMakeLists.txt:23 (find_package):
  By not providing "FindPti.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Pti", but
  CMake did not find one.

  Could not find a package configuration file provided by "Pti" with any of
  the following names:

    PtiConfig.cmake
    pti-config.cmake

  Add the installation prefix of "Pti" to CMAKE_PREFIX_PATH or set "Pti_DIR"
  to a directory containing one of the above files. If "Pti" provides a
  separate development package or SDK, be sure it has been installed.

```

I have installed “Pti” in **WSL2**. the path is on “/opt/intel/oneapi/pti/…”

link for the installation tutorial:

> **[GitHub - pytorch/pytorch: Tensors and Dynamic neural networks in Python with...](https://github.com/pytorch/pytorch?tab=readme-ov-file#install-pytorch)**
>
> Tensors and Dynamic neural networks in Python with strong GPU acceleration

---

<div class="post-metadata">

**Author:** ![Kanya](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/kanya/32/73424_2.png) [@Kanya](https://discuss.pytorch.org/u/Kanya)\
**Post date:** [October 14, 2024, 6:34pm UTC](https://discuss.pytorch.org/t/install-pytorch-2-5-using-intel-gpu-xpu/209844/2 "2024-10-14T18:34:26Z")

</div>

Hi,

Could you try

> source /opt/intel/oneapi/pti/latest/env/vars.sh

before python setup.py develop?

Here is a detailed [instruction](https://www.intel.com/content/www/us/en/developer/articles/tool/pytorch-prerequisites-for-intel-gpu/2-5.html) for building pytorch with intel xpu.
