Open shuntera opened 4 years ago
Hello Shuntera,
I would verify that the module is correct. We frequently get issues around wrong imports of the summarizer (there is another package that also has a package summarize).
I am also getting same Error
ImportError: cannot import name 'BartModel' from 'transformers' (/usr/local/lib/python3.7/dist-packages/transformers/init.py)
I am also getting same Error
ImportError: cannot import name 'BartModel' from 'transformers' (/usr/local/lib/python3.7/dist-packages/transformers/init.py)
I am also getting the same error message, but only after updating my Mac OS to Monterey, so I'm guessing it's related to that. Trying different things, but no luck yet.
Note the two errors above are different than the original message. The errors above are related to the transformers package. What version of transformers are you running?
Apologies, you're right - I was only responding to the comment, not the original post. I am using the updated transformers, version 4.15
Seems likely that @shuntera might have named the file summarizer.py which will cause problem with imports. See https://stackoverflow.com/questions/64807163/importerror-cannot-import-name-from-partially-initialized-module-m. Try rename the file to somthing different if this is the case.
After using pip install and going into my Python 3.8 shell, if I enter:
from summarizer import Summarizer
I get the error:
ImportError: cannot import name 'summarize' from partially initialized module 'summarizer' (most likely due to a circular import)