josipd / torch-two-sample

A PyTorch library for two-sample tests
Other
237 stars 33 forks source link

ModuleNotFoundError: No module named 'torch_two_sample.permutation_test' #9

Open AndreydeAguiarSalvi opened 4 years ago

AndreydeAguiarSalvi commented 4 years ago

I receive this error while trying to do this: from torch_two_sample import SmoothFRStatistic There was no error in the installation. Inside the torch_to_sample folder, I noticed that there is a permutation_test.pyx file, but not a .py file. The complete stack trace: Traceback (most recent call last): File "", line 1, in File "/media/someone/A00AA3760AA347DC/torch-two-sample/torch_two_sample/init.py", line 1, in from .statistics_diff import ( File "/media/someone/A00AA3760AA347DC/torch-two-sample/torch_two_sample/statistics_diff.py", line 9, in from .permutation_test import permutation_test_tri, permutation_test_mat ModuleNotFoundError: No module named 'torch_two_sample.permutation_test'

nkamath5 commented 1 year ago

Running the setup & install per the readme file solved this issue for me, to quote from the readme:

Installation

After installing PyTorch, you can install the package with:

python setup.py install

Testing

To run the tests you simply have to run:

python setup.py test
elidub commented 8 months ago

It seems that I have to download xcode for this in order to work. Is that necessary or are other ways to use this package?

Jot-De commented 3 months ago

A PYX file is a source code written in the Python-like language Pyrex. I had to install pyrex in order for this package to work pip install git+https://github.com/bhokansonfasig/pyrex#egg=pyrex