Skip to content

OSError: [WinError 193] %1 is not a valid Win32 application #27693

Closed
@oggyoggy448

Description

@oggyoggy448

I am trying to run the following code with anaconda 4.7.12

from __future__ import print_function
import torch
x = torch.rand(5, 3)
print(x)

Unfortunately I'm getting the following error

Traceback (most recent call last):
  File "A:/python programming/demo_pytorch/main.py", line 2, in <module>
    import torch
  File "C:\Users\nouma\Anaconda3\lib\site-packages\torch\__init__.py", line 44, in <module>
    import numpy as _np  # noqa: F401
  File "C:\Users\nouma\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 140, in <module>
    from . import _distributor_init
  File "C:\Users\nouma\AppData\Roaming\Python\Python37\site-packages\numpy\_distributor_init.py", line 26, in <module>
    WinDLL(os.path.abspath(filename))
  File "C:\Users\nouma\Anaconda3\lib\ctypes\__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

cc @peterjc123

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: windowsWindows support for PyTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions