learnables / learn2learn

A PyTorch Library for Meta-learning Research
http://learn2learn.net
MIT License
2.59k stars 348 forks source link

Some error occured when run example code #386

Closed KyleChenpopo closed 1 year ago

KyleChenpopo commented 1 year ago

Hi, thanks for the wonderful work! Currently I want to train with my custom dataset and I'm trying run the example code first. But when I run example/vision/protonet_miniimagenet.py file, it showed an error call "ImportError: cannot import name 'transforms' from partially initialized module 'learn2learn.data' (most likely due to a circular import) (D:\Application-CTC Classification\learn2learn\learn2learn\data__init__.py) ", and I also found some files under folder learn2learn/data/transforms.pyx and other files are with format ".pyx/.pyd". May I ask how to solve this problem?

t1 t2

seba-1511 commented 1 year ago

Hello @KyleChenpopo, how did you install learn2learn? Try: pip install learn2learn and it should work if you have a C compiler.

KyleChenpopo commented 1 year ago

Thanks for the reply!

I've simply git clone this repo. I also did pip install learn2learn before, but I'm not sure if I have C compiler or not. I think that's the problem. Also my PyCharm showing that only Professional version is support this data format, but I don't have Professional version.

seba-1511 commented 1 year ago

Yes, you need a C compiler to install learn2learn, and it will work if you install one. Feel free to reopen the issue if it doesn't.