2

I'm running a .py file and this error shows up:

ImportError: cannot import name 'Workflow' from 'clarifai.rest' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/clarifai-2.0.18-py3.10.egg/clarifai/rest/__init__.py)
lepsch
  • 8,927
  • 5
  • 24
  • 44

1 Answers1

2

Clarifai version 2.0.18 doesn't have the Workflow class but the newest version 2.6.2 has. Just update Clarifai with:

pip install -U clarifai

Note that clarifai package is deprecated and is 3 years already without any update. It's recommended to use the clarifai-grpc instead.

lepsch
  • 8,927
  • 5
  • 24
  • 44
  • Thank you so much! I received a new error but I'm going to try using clarifai-grpc now > FileNotFoundError: [Errno 2] No such file or directory: '/Library/Frameworks/Python.framework/Versions/3.10/bin/pip' – avidlearner Aug 27 '22 at 17:20
  • @avidlearner doesn't look like you've installed pip; I'm not sure how you've installed python on your system, but if you've used brew you can try `brew install pip`. – syntheticgio Aug 29 '22 at 12:48