# cmake for torchtext

**URL:** https://discourse.cmake.org/t/cmake-for-torchtext/7770
**Category:** Code
**Tags:** os:windows, tool:cmake
**Created:** [March 26, 2023, 11:25am UTC](https://discourse.cmake.org/t/cmake-for-torchtext/7770 "2023-03-26T11:25:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Toocic](https://discourse.cmake.org/user_avatar/discourse.cmake.org/toocic/32/3289_2.png) [@Toocic](https://discourse.cmake.org/u/Toocic)
#### Post date: [March 26, 2023, 11:25am UTC](https://discourse.cmake.org/t/cmake-for-torchtext/7770/1 "2023-03-26T11:25:20Z")

</div>

How to install torchtext in cmake project on windows 10?

Error CMake Error at X:\Programming\C++\Tests\TestPyTorch1\CMakeLists.txt:11 (find\_package):  
By not providing “FindTorchText.cmake” in CMAKE\_MODULE\_PATH this project  
has asked CMake to find a package configuration file provided by  
“TorchText”, but CMake did not find one.

Could not find a package configuration file provided by “TorchText” with  
any of the following names:

```
TorchTextConfig.cmake
torchtext-config.cmake

```

Add the installation prefix of “TorchText” to CMAKE\_PREFIX\_PATH or set  
“TorchText\_DIR” to a directory containing one of the above files. If  
“TorchText” provides a separate development package or SDK, be sure it has  
been installed. TestPyTorch1 X:\Programming\C++\Tests\TestPyTorch1 X:\Programming\C++\Tests\TestPyTorch1\CMakeLists.txt 11
