Pytorch mertic learning package problem

I’ve tried to use pytorch-mertic-learning module, but after install it with the command:
conda install pytorch-metric-learning -c metric-learning
I couldn’t import it. I also notice that if I’m searching for conda list in terminal I got the following result:

Importance thing to say is that I got this issue on Jupiter NoteBook.


These import errors are often created, if your Jupyter notebook uses a different environment (and thus kernel) as the one you’ve installed the package in.
Make sure to select the right environment in your notebook or restart Jupyter in your virtual environment.


Thanks for answering!
If I got you right, I use conda environment so I made an installation using conda command.

Am I missing something?

This should usually work. However inside your notebook you should have a menu where you can select different kernels.
I’ve seen Jupyter sometimes select the system Python installation instead of the conda one, so I stick to put everything in a virtual environment. :wink:

Thanks for helping :relaxed: