ModuleNotFoundError: No module named 'transformers.modeling_outputs'
I’m trying to setup DeepFloyd on my MACUsing VSCODETraceback (most recent call last):File “/Users/ryaker/Dev/Python/DeepFloydPlay20230515.py”, line 3, infrom diffusers import DiffusionPipelineFile “/Users/ryaker/anaconda3/lib/python3.10/site-packages/diffusers/init.py”, line 3, infrom .configuration_utils import ConfigMixinFile “/Users/ryaker/anaconda3/lib/python3.10/site-packages/diffusers/configuration_utils.py”, line 34, infrom .utils import (File “/Users/ryaker/anaconda3/lib/python3.10/site-packages/diffusers/utils/init.py”, line 21, infrom .accelerate_utils import apply_forward_hookFile “/Users/ryaker/anaconda3/lib/python3.10/site-packages/diffusers/utils/accelerate_utils.py”, line 24, inimport accelerateFile “/Users/ryaker/anaconda3/lib/python3.10/site-packages/accelerate/init.py”, line 7, infrom .accelerator import AcceleratorFile “/Users/ryaker/anaconda3/lib/python3.10/site-packages/accelerate/accelerator.py”, line 27, infrom .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_stateFile “/Users/ryaker/anaconda3/lib/python3.10/site-packages/accelerate/checkpointing.py”, line 24, infrom .utils import (File “/Users/ryaker/anaconda3/lib/python3.10/site-packages/accelerate/utils/init.py”, line 103, infrom .megatron_lm import (File “/Users/ryaker/anaconda3/lib/python3.10/site-packages/accelerate/utils/megatron_lm.py”, line 32, infrom transformers.modeling_outputs import (ModuleNotFoundError: No module named ‘transformers.modeling_outputs’
2023-05-16T02:35:29Z
Was having a similar problem with missing transformer.agents. Upgrading the package resolved module not foundif you are using anaconda, try:import sys
!{sys.executable} -m pip install --upgrade transformers
2023-05-16T02:39:08Z
SimonZh:-m pip install --upgrade transformersThank You, that did it.