Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'pipeline' from 'transformers' #41

Closed
boralprophecy opened this issue Mar 15, 2020 · 2 comments
Closed

Comments

@boralprophecy
Copy link

When trying to import TransformersReader, I am getting the following error

from haystack.reader.transformers import TransformersReader

Error :

>>> from haystack.reader.transformers import TransformersReader
ImportError: cannot import name 'pipeline' from 'transformers' (C:\ANACON~1\lib\site-packages\transformers\__init__.py)

Please note I am in the directory haystack-master. I am using windows 10.

Please help me in solving this.

@tholor
Copy link
Member

tholor commented Mar 15, 2020

Hey @boralprophecy ,

I was not able to reproduce this. What version of Transformers do you have installed? It seems that it cannot import the pipeline object from there. Haystack is currently using Transformers v2.4.0 (2.5.1 should also work, but it is not fully tested yet).

@boralprophecy
Copy link
Author

It was a version issue. During installation of FARM, transformers was in version 2.1.1 which was giving the error. Have upgraded to 2.5.1. Now it is working fine. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants