text icon indicating copy to clipboard operation
text copied to clipboard

OS Error - WinError 127 torchtext - Pytorch CUDA 12.1 error

Open GodRishUniverse opened this issue 10 months ago • 0 comments

🐛 Bug

Describe the bug A clear and concise description of what the bug is. I get an OS Error with WinError 127 error code when importing torchtext and I cannot use it.

To Reproduce Steps to reproduce the behavior:

  1. install torch from the command pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
  2. import torchtext

Expected behavior No issues or errors to pop up as I am already on PyTorch version >= 2.3.0

Screenshots If applicable, add screenshots to help explain your problem.

Image

Image

Environment

  • PyTorch Version: 2.5.1+cu121
  • OS: Windows
  • How you installed PyTorch: pip
  • Build command you used (if compiling from source):
  • Python version: 3.11.5
  • CUDA/cuDNN version: 12.1
  • GPU models and configuration: RTX 4060 Laptop
  • Any other relevant information:

Additional context It was working fine with my CUDA 12.1 install and then I uninstalled my torch install because I was getting this error UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at to install CUDA 12.4. During Uninstallation I am getting manual removing errors:

WARNING: Failed to remove contents in a temporary directory 'C:\Users\Rishabh\AppData\Local\Temp\pip-uninstall-tysba_4p'.
You can safely remove it manually.
WARNING: Failed to remove contents in a temporary directory 'C:\Users\Rishabh\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\~ib'.
You can safely remove it manually.

But it was not running, so I reinstalled CUDA 12.1 PyTorch and now I get this error.

GodRishUniverse avatar Jan 26 '25 15:01 GodRishUniverse