justanhduc / neuralnet-pytorch

A high level framework for general purpose neural networks in Pytorch.
https://neuralnet-pytorch.readthedocs.io
MIT License
27 stars 6 forks source link

ModuleNotFoundError: No module named 'neuralnet_pytorch.ext' #7

Closed ahariri13 closed 3 years ago

ahariri13 commented 3 years ago

I installed all recommended packages but i get this error when i try to use emd loss.

justanhduc commented 3 years ago

Hi @ahariri13. Could you please let me know the command you used for installation?

ahariri13 commented 3 years ago

Hi @justanhduc , On Google Colab:

!pip install git+git://github.com/justanhduc/neuralnet-pytorch.git@master

!pip install "neuralnet-pytorch[geom] @ git+git://github.com/justanhduc/neuralnet-pytorch.git@master"

!pip install neuralnet-pytorch --global-option="--cuda-ext"

A while ago there was a branch called "fancy" i think which i used to clone and it worked fine but that branch has been removed i believe ?

justanhduc commented 3 years ago

I merged the two branches as I don't want to maintain both and use a flag to install the "fancy" branch. Could you try clone the repo and try

python setup.py install --cuda-ext
TreeberryTomato commented 3 years ago

Hi @justanhduc , may i know is there a way to solve this error by just using pip install ? Because in my computer install package using python setup.py always fail.

justanhduc commented 3 years ago

Hey @TreeberryTomato. This is the pip way pip install git+git://github.com/justanhduc/neuralnet-pytorch.git@master but I don't think it's gonna work either as what pip does is simply download the source and compile. I think what you meant is binary but unfortunately I don't provide binary. Could you plz paste your error log here?

TreeberryTomato commented 3 years ago

LINK : fatal error LNK1181: cannot open input file 'C:\neuralnet-pytorch-master\build\temp.win-amd64-3.6\Release\neuralnet-pytorch-master\neuralnet_pytorch\extensions\csrc\bindings.obj' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\link.exe' failed with exit status 1181

There is no obj file in that path, don't know why it didn't produce the obj file

justanhduc commented 3 years ago

Have you tried compiling Pytorch C++ code on Windows before?

TreeberryTomato commented 3 years ago

No, always use pip

justanhduc commented 3 years ago

Then I don't think your environment setting is correct to compile from source. Please setup the environment so that you can compile Pytorch custom C++/CUDA codes first and try again.