Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Module name simclr #62

Open
massih10 opened this issue Mar 2, 2021 · 3 comments
Open

No Module name simclr #62

massih10 opened this issue Mar 2, 2021 · 3 comments

Comments

@massih10
Copy link

massih10 commented Mar 2, 2021

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
Copy link

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
Copy link

danni9594 commented Nov 20, 2021

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

@dingxlcse
Copy link

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants