<p dir="auto">Hi, I created an env with conda, installed TF, then installed PyTorch, then "pip install git+<a href="https://github.com/huggingface/transformers">https://github.com/huggingface/transformers</a>", but when I ran 'python -c "from transformers import pipeline; print(pipeline('sentiment-analysis')('I hate you'))"', it gave me the ImportError. How can I resolve this?</p>
<ul dir="auto">
<li><code class="notranslate">transformers</code> 4.2</li>
<li>Platform: MacOS</li>
<li>Python version: 3.7.9</li>
<li>PyTorch version (GPU?): CPU</li>
<li>Tensorflow version (GPU?): CPU</li>
<li>Using GPU in script?: No</li>
<li>Using distributed or parallel set-up in script?: No</li>
<li>Pip Version: Latest</li>
</ul>
<p dir="auto">I can't import the pipeline function:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from transformers import pipeline"><pre class="notranslate"><code class="notranslate">from transformers import pipeline
</code></pre></div>
<p dir="auto">Gives the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
ImportError: cannot import name 'pipeline' from 'transformers' (unknown location)"><pre lang="Traceback" class="notranslate"><code class="notranslate">File "&lt;stdin&gt;", line 1, in &lt;module&gt;
ImportError: cannot import name 'pipeline' from 'transformers' (unknown location)
</code></pre></div>