google-research / meta-dataset

A dataset of datasets for learning to learn from few examples
Apache License 2.0
760 stars 139 forks source link

No Module name simclr #62

Open massih10 opened 3 years ago

massih10 commented 3 years ago

Hi,

when cloning the repo and testing the Intro_to_Metadataset.ipynb notebook the first cell gives me an error:

ModuleNotFoundError: No module named 'simclr'

When i install it using pip3 install simclr, it installed torch torchvision and simclr but I end up with another error

ImportError: cannot import name 'data_util' from 'simclr' (/home/shoseini/.local/lib/python3.8/site-packages/simclr/init.py)

Can you help me out with this? I m on Ubuntu 20.04

brenowca commented 3 years ago

Hi @massih10 I ran into the same problem as you. I solved it by uninstalling the meta-dataset package using pip and then installing it again using the setup.py file.

Do pip3 uninstall meta-dataset,

then go the repository folder and run: python3 setup.py install

I think it is not an ideal solution (specially because things are going to break if we use this package as a dependency for another package), but it should at least allow you to play with the code while the authors fix this issue.

I hope it helps :)

danni9594 commented 2 years ago

Simply comment out from simclr import data_util in meta_dataset/data/pipeline.py Then the notebook run just fine

dingxlcse commented 1 year ago

Hi,

when cloning the repo and testing the Intro_to_Metadataset.ipynb notebook the first cell gives me an error:

ModuleNotFoundError: No module named 'simclr'

When i install it using pip3 install simclr, it installed torch torchvision and simclr but I end up with another error

ImportError: cannot import name 'data_util' from 'simclr' (/home/shoseini/.local/lib/python3.8/site-packages/simclr/init.py)

Can you help me out with this? I m on Ubuntu 20.04

the module is anthor’s module. its location is in './simple-cnaps/meta-dataset/build/lib'. To solve the problem,you can add this follow codes: simclrPath = './simple-cnaps/meta-dataset/build/lib' sys.path.append(os.path.abspath(simclrPath))