Open fmorenopino opened 1 year ago
Were you using conda
/mamba
? I've only been able to get this working by installing via pip
.
I've met the question as you too. I looked at the directory of the conda virtual environment and found that captum was not installed into the Lib\site-packages\ directory, but instead installed a site-packages directory that it created on its own under the home directory. I solved this problem by copying the file to Lib.
Duplicate of #1207
🐛 Bug
I have been trying to import and using captum in different environments and different machines and I cannot import them (no problem on the installation).
To Reproduce
For example, trying to import it from the tutorials as follows:
Results in the following error:
ModuleNotFoundError: No module named 'captum.attr'; 'captum' is not a package
Tested on python 3.10.12, linux and mac, and Pytorch 2.0.1+cu117.