baowenbo/DAIN

When I run the 2nd command from the Readme, I get the error „No module named torch”

sosasees opened this issue · 4 comments

When I run the 2nd command from the Readme, the command being

python -c "import torch; print(torch.__version__)"

, I get this error as the output of the command:

Traceback (most recent call last):
File "", line 1, in
ImportError: No module named torch

. How do I fix this error so that I can install DAIN on my Linux Computer?

@sosasees Hi! That step is to verify that you have PyTorch as a module available. The error demonstrates that you don't. As such, you'd need to install PyTorch 1.0.0 or above.

pip install torch==1.4.0

PyTorch 1.4 is the latest version compile with DAIN, it's faster than 1.0.0

Thanks for the Installation Command.
I must've taken a break not long enough, because I didn't see it at the beginning of the Readme.

I suggest changing the recommended PyTorch version from 1.0.0 to 1.0.4 because of @iBobbyTS,
but I don't exactly know how to communicate that without:

  • removing the information that PyTorch 1.0.0 is also compatible without clunkiying up the wording

In the README, it says it needs to be torch>=1.0.0. Torch 1.5.0 causes errors when building CUDAExtension. Torch 1.4.0 works, and it does a faster job than 1.0.0. There will be warnings in 1.4.0, just use a warning filter to remove them, not a big deal.