lucasdelimanogueira / PyNorch

Recreating PyTorch from scratch (C/C++, CUDA, NCCL and Python, with multi-GPU support and automatic differentiation!)
115 stars 7 forks source link

Issue when importing norch: OSError: [WinError 193] %1 is not a valid Win32 application #58

Open StefanoBraghetto opened 6 months ago

StefanoBraghetto commented 6 months ago

Hey Lucas, Congrats for such a great work again.

I'm having an issue when importing the library. But it's very likely is environment issue. Because I have been having troubles with other libraries as well. Just posting it here in case you can confirm this:

import norch

File ~\anaconda3\envs\name_env\Lib\site-packages\norch__init__.py:1 from norch.tensor import Tensor

File ~\anaconda3\envs\name_env\Lib\site-packages\norch\tensor.py:15 class Tensor:

File ~\anaconda3\envs\name_env\Lib\site-packages\norch\tensor.py:17 in Tensor _C = ctypes.CDLL(os.path.join(module_dir, "libtensor.so"))

File ~\anaconda3\envs\name_env\Lib\ctypes__init.py:379 in init__ self._handle = _dlopen(self._name, mode)

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

Thanks! Stefano

NguyenVanThanhHust commented 5 months ago

You are running on window. libtensor.so" is build for Linux. You have to recomplie lib