pytorch_fft icon indicating copy to clipboard operation
pytorch_fft copied to clipboard

Issue while pip installing fft package

Open ghost opened this issue 7 years ago • 8 comments

I have following issue while installing pytorch-fft package.

capture

ghost avatar Nov 12 '17 17:11 ghost

This looks like an issue with the ffi_extension package handling Windows style path names, are you able to run the examples here?

riceric22 avatar Nov 27 '17 17:11 riceric22

@fswerty @riceric22 i got the same issue when i pip install pytorch-fft on windows.

zaczou avatar Dec 20 '17 12:12 zaczou

I made a ugly hack and successfully installed this plugin.

https://github.com/bloodmage/pytorch_fft

I also added an compiled egg, you may try your luck.

ghost avatar Apr 18 '18 11:04 ghost

I had the same problem in windows 10 and so I tried the "hacked one". Got the following errors;

(C:\ProgramData\Anaconda3\envs\pytorchenv) C:\Users\MONSTER\Desktop\pytorch_fft-master>python setup.py build
Including CUDA code.
Including CUDA code.
running build
running build_py
creating build\lib.win-amd64-3.6\pytorch_fft\_ext\fft
copying pytorch_fft\_ext\fft\autograd.py -> build\lib.win-amd64-3.6\pytorch_fft\_ext\fft
copying pytorch_fft\_ext\fft\fft.py -> build\lib.win-amd64-3.6\pytorch_fft\_ext\fft
copying pytorch_fft\_ext\fft\__init__.py -> build\lib.win-amd64-3.6\pytorch_fft\_ext\fft
copying pytorch_fft\_ext\th_fft\__init__.py -> build\lib.win-amd64-3.6\pytorch_fft\_ext\th_fft
running build_ext
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\_th_fft.c'
already up-to-date
building '_th_fft' extension
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -IC:\ProgramData\Anaconda3\envs\pytorchenv\lib\site-packages\torch\utils\ffi\..\..\lib\include -IC:\ProgramData\Anaconda3\envs\pytorchenv\lib\sit
e-packages\torch\utils\ffi\..\..\lib\include\TH -IC:\ProgramData\Anaconda3\envs\pytorchenv\lib\site-packages\torch\utils\ffi\..\..\lib\include\THC -IC:\Users\MONSTER\Desktop\pytorch_fft-master/pytorch
_fft/src "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -IC:\ProgramData\Anaconda3\envs\pytorchenv\include -IC:\ProgramData\Anaconda3\envs\pytorchenv\include "-IC:\Program Files (
x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Progr
am Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\P
rogram Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /Tcbuild\temp.win-amd64-3.6\Release\_th_fft.c /Fobuild\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release\_th_fft.obj
error: command 'cl.exe' failed with exit status -1073741515

kyillene avatar Apr 19 '18 14:04 kyillene

What's your cl.exe version? Does it match the version of your toolset? I analysed build flags, there are few differences:

Yours: cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -IC:\ProgramData\Anaconda3\envs\pytorchenv\lib\site-packages\torch\utils\ffi....\lib\include -IC:\ProgramData\Anaconda3\envs\pytorchenv\lib\site-packages\torch\utils\ffi....\lib\include\TH -IC:\ProgramData\Anaconda3\envs\pytorchenv\lib\site-packages\torch\utils\ffi....\lib\include\THC -IC:\Users\MONSTER\Desktop\pytorch_fft-master/pytorch_fft/src "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -IC:\ProgramData\Anaconda3\envs\pytorchenv\include -IC:\ProgramData\Anaconda3\envs\pytorchenv\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /Tcbuild\temp.win-amd64-3.6\Release_th_fft.c /Fobuild\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release_th_fft.obj

Mine: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -IC:\Anaconda\envs\py3\lib\site-packages\torch\utils\ffi....\lib\include -IC:\Anaconda\envs\py3\lib\site-packages\torch\utils\ffi....\lib\include\TH -IC:\Anaconda\envs\py3\lib\site-packages\torch\utils\ffi....\lib\include\THC "-IC:\Program Files\NVIDIA Corporation\NvToolsExt/include" -IC:\Users\Administrator\Documents\GitHub\pytorch_fft/pytorch_fft/src "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -IC:\Anaconda\envs\py3\include -IC:\Anaconda\envs\py3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcbuild\temp.win-amd64-3.6\Release_th_fft.c /Fobuild\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release_th_fft.obj

ghost avatar Apr 27 '18 12:04 ghost

1073741515 means some dll cannot be found. Maybe you should install some extra windows toolset.

https://stackoverflow.com/questions/22038660/visual-studio-2013-cl-exe-exited-with-code-1073741515

ghost avatar Apr 27 '18 12:04 ghost

Hi, i 'm also working on windows (10), i followd the steps bloodmage suggested but when i try to run python -c "import pytorch_fft" i get: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\iariav\Anaconda3\envs\pytorch\lib\site-packages\pytorch_fft\__init__.py", line 1, in <module> from . import fft File "C:\Users\iariav\Anaconda3\envs\pytorch\lib\site-packages\pytorch_fft\fft\__init__.py", line 1, in <module> from .fft import * File "C:\Users\iariav\Anaconda3\envs\pytorch\lib\site-packages\pytorch_fft\fft\fft.py", line 3, in <module> from .._ext import th_fft File "C:\Users\iariav\Anaconda3\envs\pytorch\lib\site-packages\pytorch_fft\_ext\th_fft\__init__.py", line 3, in <module> from ._th_fft import lib as _lib, ffi as _ffi ImportError: DLL load failed: The specified module could not be found.

any idea what it could be? i made sure all compiled files are where they should (i have the _th_fft.pyd file at the th_fft folder)

thanks

iariav avatar Jul 06 '18 18:07 iariav

Pytorch is updated, aten.lib and thc.lib should be regenerated using most recent dll. Check my most recent version or regenerate these libraries by yourself. That should work.

ghost avatar Jul 17 '18 02:07 ghost