Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

OS Error - WinError 127 torchtext - Pytorch CUDA 12.1 error #2280

@GodRishUniverse

Description

@GodRishUniverse

🐛 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions