擅长:python、mysql、java
<p>刚刚碰到这个。某种程度上。Pip对我起作用,但是在安装<a href="http://github.com/joeyespo/pytest-watch" rel="noreferrer">pytest-watch</a>之后,运行<code>ptw</code>脚本会产生这个错误。</p>
<p>出于某种原因,pip停止引用#!在<code>ptw-script.py</code>中:</p>
<pre><code>#!C:\Program Files (x86)\Python\python.exe
</code></pre>
<p>在我手动添加引号之后,它就工作了:</p>
<pre><code>#!"C:\Program Files (x86)\Python\python.exe"
</code></pre>
<p>我真不知道为什么突然发生了这种事。在这里添加这个,以防其他人从谷歌来到这里遇到同样的事情。</p>
<p>这是一个<a href="https://github.com/pypa/pip/issues/923" rel="noreferrer">related pip issue</a>(我想)。</p>