Can't import pipeline
- `transformers` 4.2
- Platform: MacOS
- Python version: 3.7.9
- PyTorch version (GPU?): CPU
- Tensorflow version (GPU?): CPU
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No
- Pip Version: Latest

I can't import the pipeline function:
```
from transformers import pipeline
```

Gives the following error:
```Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'pipeline' from 'transformers' (unknown location)
```

I can't reproduce on version 4.2.x or `master`.

This may have something to do with your environment. Can you let me know if the following threads help you out:

- https://stackoverflow.com/questions/58585690/python-cannot-import-unknown-location
- https://forum.learncodethehardway.com/t/importerror-unknown-location/2034/8
- https://python-forum.io/Thread-import-error-unknown-location

They're related to `parser` but it may be a similar issue to the one you're encountering here. <|||||>#7333 Check your **tensorflow** version<|||||>@dg-data  I'm not using Tensorflow, does that matter? my tf is the latest version.<|||||>upgraded tf fixed it, thanks.<|||||>> 
> 
> upgraded tf fixed it, thanks.
@hassanzadeh
 Now,which version your tf is?   I just know it's need version 2.0.<|||||>According to [documentation](https://huggingface.co/transformers/installation.html), this should also run without TF at all, but with PyTorch alone. The answer seems to suggest that TF is required under all circumstances. I just tried a PyTorch-only installation and ran into the same error. Now shifting to TF, but I guess the documentation should be updated or the PyTorch-only install should be checked.<|||||>@chiarcos would you happen to have a reproducer to run into the issue with PyTorch-only installs? It shouldn't (and isn't) required to have TF installed for pipelines, so this is a bug that I, unfortunately, can't manage to reproduce.<|||||>Got same bug, on pytorch-only enviroment as well.<|||||>> 
> 
> @chiarcos would you happen to have a reproducer to run into the issue with PyTorch-only installs? It shouldn't (and isn't) required to have TF installed for pipelines, so this is a bug that I, unfortunately, can't manage to reproduce.

Apologies, I had shifted to TF installation already. This worked like a charm and the system is in production. I see to reproduce it when I have a minute.<|||||>Using conda pytorch environment and got the same bug<|||||>Same here<|||||>Same here, also installing TF in addition to PyTorch didn't help...